2
0
mirror of https://github.com/boostorg/mysql.git synced 2026-02-14 12:52:17 +00:00
Files
mysql/example/Jamfile
2022-03-30 15:54:58 +02:00

67 lines
1.7 KiB
Plaintext

#
# Copyright (c) 2019-2022 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
import os ;
# The hostname to use for examples
local hostname = [ os.environ BOOST_MYSQL_SERVER_HOST ] ;
if $(hostname) = ""
{
hostname = "localhost" ;
}
# Example list
local examples_no_unix =
tutorial
value
query_sync
query_async_callbacks
query_async_coroutines
query_async_coroutinescpp20
query_async_futures
metadata
prepared_statements
default_completion_tokens
ssl
timeouts
;
local example_targets ;
# Non-UNIX
for local example in $(examples_no_unix)
{
local example_name = "boost_mysql_example_$(example)" ;
unit-test $(example_name)
:
"$(example).cpp"
/boost/mysql//boost_mysql
/boost/coroutine//boost_coroutine
:
<testing.arg>"example_user example_password $(hostname)"
;
explicit $(example_name) ;
example_targets += $(example_name) ;
}
# UNIX. Honor BOOST_MYSQL_NO_UNIX_SOCKET_TESTS for homogeneity with cmake
if [ os.environ BOOST_MYSQL_NO_UNIX_SOCKET_TESTS ] = "" {
unit-test boost_mysql_example_unix_socket
:
unix_socket.cpp
/boost/mysql//boost_mysql
:
<testing.arg>"example_user example_password"
;
explicit boost_mysql_example_unix_socket ;
example_targets += boost_mysql_example_unix_socket ;
}
# Helper to run all of them in one go
alias boost_mysql_all_examples : $(example_targets) ;
explicit boost_mysql_all_examples ;