2006-11-07 02:19:13 +00:00
|
|
|
# Boost System Library test Jamfile
|
|
|
|
|
|
|
|
# Copyright Beman Dawes 2003, 2006
|
|
|
|
|
|
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
|
|
# See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt
|
|
|
|
|
|
|
|
# See library home page at http://www.boost.org/libs/system
|
|
|
|
|
2017-06-13 20:12:21 +03:00
|
|
|
import testing ;
|
2013-12-02 13:54:25 -05:00
|
|
|
|
2006-11-07 02:19:13 +00:00
|
|
|
project
|
|
|
|
: requirements
|
|
|
|
<library>/boost/system//boost_system
|
2007-09-11 02:07:50 +00:00
|
|
|
<toolset>msvc:<asynch-exceptions>on
|
2006-11-07 02:19:13 +00:00
|
|
|
;
|
2010-07-06 10:47:30 +00:00
|
|
|
|
|
|
|
lib throw_test
|
|
|
|
: throw_test.cpp
|
|
|
|
: <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
|
2012-05-21 13:39:58 +00:00
|
|
|
<link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
|
2010-07-06 10:47:30 +00:00
|
|
|
;
|
2017-07-24 04:52:55 +03:00
|
|
|
|
2018-01-21 22:29:58 +02:00
|
|
|
lib single_instance_lib1 : single_instance_1.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
|
|
|
|
lib single_instance_lib2 : single_instance_2.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
|
|
|
|
|
2017-07-24 04:52:55 +03:00
|
|
|
rule cxx03 ( properties * )
|
|
|
|
{
|
|
|
|
local result ;
|
|
|
|
|
2018-01-18 00:01:17 +02:00
|
|
|
if <toolset>gcc in $(properties)
|
2018-01-17 19:06:44 +02:00
|
|
|
{
|
2018-01-18 00:01:17 +02:00
|
|
|
result = <cxxflags>-std=c++98 ; # 4.4 has no 03
|
2018-01-17 19:06:44 +02:00
|
|
|
}
|
2018-01-18 00:01:17 +02:00
|
|
|
else if <toolset>clang in $(properties)
|
2017-07-24 04:52:55 +03:00
|
|
|
{
|
|
|
|
result = <cxxflags>-std=c++03 ;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
result = <build>no ;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $(result) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
rule cxx11 ( properties * )
|
|
|
|
{
|
|
|
|
local result ;
|
|
|
|
|
2018-01-18 00:01:17 +02:00
|
|
|
if <toolset>gcc in $(properties)
|
2017-07-24 05:15:49 +03:00
|
|
|
{
|
2018-01-18 00:01:17 +02:00
|
|
|
result = <cxxflags>-std=c++0x ; # 4.6 has no 11
|
2017-07-24 05:15:49 +03:00
|
|
|
}
|
2018-01-18 00:01:17 +02:00
|
|
|
else if <toolset>clang in $(properties)
|
2017-07-24 04:52:55 +03:00
|
|
|
{
|
|
|
|
result = <cxxflags>-std=c++11 ;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
result = <build>no ;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $(result) ;
|
|
|
|
}
|
2006-11-07 02:19:13 +00:00
|
|
|
|
2018-01-21 18:21:34 +02:00
|
|
|
rule system-run- ( sources + )
|
|
|
|
{
|
|
|
|
local result ;
|
|
|
|
|
|
|
|
result += [ run $(sources) : : : <link>static : $(sources[1]:B)_static ] ;
|
2018-01-21 20:42:08 +02:00
|
|
|
result += [ run $(sources) : : : <link>shared : $(sources[1]:B)_shared ] ;
|
2018-01-21 18:21:34 +02:00
|
|
|
result += [ run $(sources) : : : -<library>/boost/system//boost_system <define>BOOST_ERROR_CODE_HEADER_ONLY : $(sources[1]:B)_header ] ;
|
|
|
|
|
|
|
|
return $(result) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
rule system-run ( sources + )
|
|
|
|
{
|
|
|
|
local result = [ system-run- $(sources) ] ;
|
|
|
|
|
|
|
|
# Test a source file built with -std=c++03 linked with a System library built without -std=c++03
|
|
|
|
result += [ run $(sources) : : : <link>static <conditional>@cxx03 : $(sources[1]:B)_static_03 ] ;
|
|
|
|
result += [ run $(sources) : : : <link>shared <conditional>@cxx03 : $(sources[1]:B)_shared_03 ] ;
|
|
|
|
|
|
|
|
# Test a source file built with -std=c++11 linked with a System library built without -std=c++11
|
|
|
|
result += [ run $(sources) : : : <link>static <conditional>@cxx11 : $(sources[1]:B)_static_11 ] ;
|
|
|
|
result += [ run $(sources) : : : <link>shared <conditional>@cxx11 : $(sources[1]:B)_shared_11 ] ;
|
|
|
|
|
|
|
|
return $(result) ;
|
|
|
|
}
|
|
|
|
|
2006-11-07 02:19:13 +00:00
|
|
|
test-suite "system"
|
2018-01-21 18:21:34 +02:00
|
|
|
: [ system-run error_code_test.cpp ]
|
|
|
|
[ system-run error_code_user_test.cpp ]
|
|
|
|
[ system-run system_error_test.cpp ]
|
2010-07-06 10:47:30 +00:00
|
|
|
[ run dynamic_link_test.cpp throw_test
|
|
|
|
: : : <link>shared : throw_test_shared
|
2006-11-07 02:19:13 +00:00
|
|
|
]
|
2018-01-21 18:21:34 +02:00
|
|
|
[ system-run initialization_test.cpp ]
|
2007-09-09 14:59:10 +00:00
|
|
|
[ run header_only_test.cpp
|
2018-01-14 04:56:58 +02:00
|
|
|
: : : -<library>/boost/system//boost_system
|
2007-09-09 14:59:10 +00:00
|
|
|
]
|
2017-11-01 20:34:53 +02:00
|
|
|
[ run header_only_test.cpp
|
2018-01-14 04:56:58 +02:00
|
|
|
: : : -<library>/boost/system//boost_system <define>BOOST_NO_ANSI_APIS : header_only_test_no_ansi
|
2017-11-01 20:34:53 +02:00
|
|
|
]
|
2018-01-21 18:21:34 +02:00
|
|
|
[ run config_test.cpp
|
|
|
|
: : : <test-info>always_show_run_output
|
2018-01-14 05:29:02 +02:00
|
|
|
]
|
2018-01-21 18:21:34 +02:00
|
|
|
[ system-run- std_interop_test.cpp ]
|
|
|
|
[ system-run std_mismatch_test.cpp ]
|
|
|
|
[ system-run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp ]
|
2018-01-21 22:29:58 +02:00
|
|
|
[ run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : <link>static : single_instance_lib_static ]
|
|
|
|
[ run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : <link>shared : single_instance_lib_shared ]
|
2018-01-21 18:21:34 +02:00
|
|
|
[ system-run before_main_test.cpp ]
|
2006-11-07 02:19:13 +00:00
|
|
|
;
|
2017-09-05 04:52:08 +03:00
|
|
|
|
|
|
|
# Quick (CI) test
|
|
|
|
run quick.cpp ;
|