diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 1a88d0102..41117f5b6 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -35,6 +35,7 @@ import os ; import indirect ; import path ; +import config : requires ; import configure ; import threadapi-feature ; @@ -307,13 +308,19 @@ alias thread_sources explicit thread_sources ; +local cxx_requirements = [ requires + cxx11_noexcept # from lexical_cast, possibly through date_time +] ; + lib boost_thread : thread_sources : @requirements + $(cxx_requirements) : : shared:BOOST_THREAD_USE_DLL=1 static:BOOST_THREAD_USE_LIB=1 @usage-requirements + $(cxx_requirements) ; -boost-install boost_thread ; \ No newline at end of file +boost-install boost_thread ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 3f81bc07e..29a837b3c 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -18,6 +18,7 @@ # bring in rules for testing import testing ; +import config : requires ; import regex ; import path ; import os ; @@ -268,6 +269,10 @@ rule generate_self_contained_header_tests if ! [ os.environ BOOST_THREAD_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ] { + local cxx_requirements = [ requires + cxx11_static_assert # from atomic + ] ; + local headers_path = [ path.make $(BOOST_ROOT)/libs/thread/include/boost/thread ] ; for file in [ path.glob-tree $(headers_path) : *.hpp : detail pthread win32 ] { @@ -276,8 +281,8 @@ rule generate_self_contained_header_tests # All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes. local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ; #ECHO $(rel_file) ; - all_rules += [ compile self_contained_header.cpp : "BOOST_THREAD_TEST_HEADER=$(rel_file)" $(file) : $(test_name) ] ; - all_rules += [ compile self_contained_header.cpp : "BOOST_THREAD_TEST_HEADER=$(rel_file)" "BOOST_THREAD_TEST_POST_WINDOWS_H" $(file) @windows-cygwin-specific : $(test_name)-post_winh ] ; + all_rules += [ compile self_contained_header.cpp : "BOOST_THREAD_TEST_HEADER=$(rel_file)" $(file) $(cxx_requirements) : $(test_name) ] ; + all_rules += [ compile self_contained_header.cpp : "BOOST_THREAD_TEST_HEADER=$(rel_file)" "BOOST_THREAD_TEST_POST_WINDOWS_H" $(file) @windows-cygwin-specific $(cxx_requirements) : $(test_name)-post_winh ] ; } }