1# 2# Copyright Renato Tegon Forti, Antony Polukhin 2011 - 2019. 3# Distributed under the Boost Software License, Version 1.0. 4# (See accompanying file LICENSE_1_0.txt or copy at 5# http://www.boost.org/LICENSE_1_0.txt) 6# 7 8# For more information, see http://www.boost.org 9 10# bring in rules for testing 11import testing ; 12import path ; 13 14local RDYNAMIC = <target-os>freebsd:<linkflags>"-rdynamic" <target-os>solaris:<linkflags>"-Bdynamic" <target-os>aix:<linkflags>"-rdynamic" 15 <target-os>qnxnto,<toolset>qcc:<linkflags>"-Bdynamic" <target-os>qnxnto,<toolset>gcc:<linkflags>"-rdynamic" 16 <target-os>android:<linkflags>"-rdynamic" <target-os>linux:<linkflags>"-rdynamic" <target-os>darwin,<toolset>gcc:<linkflags>"-dynamic" 17 <target-os>darwin,<toolset>clang:<linkflags>"-rdynamic" <target-os>iphone:<linkflags>"-rdynamic" ; 18 19 20# Static library that is not linked with any of the boost libs 21lib static_plugin : ../example/tutorial4/static_plugin.cpp : <link>static <define>BOOST_SYSTEM_NO_DEPRECATED $(RDYNAMIC) ; 22lib static_refcounting_plugin : ../example/tutorial8/refcounting_plugin.cpp : <link>static <define>BOOST_SYSTEM_NO_DEPRECATED <variant>release $(RDYNAMIC) ; 23 24 25project 26 : source-location . 27 : requirements 28 29 # linux 30 <target-os>linux:<linkflags>"-ldl" 31 <toolset>gcc:<cxxflags>"-Wall -Wextra -pedantic -Wno-long-long" 32 33 # others 34 <local-visibility>hidden 35 <library>/boost/filesystem//boost_filesystem 36 <library>/boost/system//boost_system 37 <threading>multi 38 <define>BOOST_SYSTEM_NO_DEPRECATED 39 ; 40{ 41 42 # our test lib for shared library tests 43 lib test_library : test_library.cpp : <link>shared ; 44 lib empty_library : empty_library.cpp : <link>shared ; 45 lib getting_started_library : ../example/getting_started_library.cpp : <link>shared ; 46 lib my_plugin_sum : ../example/tutorial1/my_plugin_sum.cpp : <link>shared ; 47 lib my_plugin_aggregator : ../example/tutorial2/my_plugin_aggregator.cpp : <link>shared ; 48 lib on_unload_lib : ../example/tutorial6/on_unload_lib.cpp : <link>shared ; 49 lib library1 : ../example/tutorial7/library1.cpp : <link>shared ; 50 lib library2 : ../example/tutorial7/library2.cpp : <link>shared ; 51 lib refcounting_plugin : ../example/tutorial8/refcounting_plugin.cpp : <link>shared ; 52 lib cpp_plugin : cpp_test_library.cpp : <link>shared ; 53 lib cpp_mangle_plugin : cpp_ctti_type_name_parser_lib.cpp : <link>shared <define>_GLIBCXX_USE_CXX11_ABI=1 ; 54 55 test-suite boostdll 56 : 57 [ run link1.cpp link2.cpp : : : : validate_link ] 58 [ run shared_library_load_test.cpp : : library1 test_library : <link>shared ] 59 [ run shared_library_search_symbol_test.cpp : : test_library : $(RDYNAMIC) <link>shared ] 60 [ run shared_library_get_symbol_test.cpp : : test_library : $(RDYNAMIC) <link>shared ] 61 [ run shared_library_get_symbol_test.cpp 62 : 63 : test_library 64 : $(RDYNAMIC) <target-os>windows:<define>BOOST_USE_WINDOWS_H <link>shared 65 : get_symbol_windows_h_forced 66 ] 67 [ run symbol_runtime_info_test.cpp : : test_library : $(RDYNAMIC) <link>shared ] 68 [ run shared_library_errors.cpp : : test_library : <test-info>always_show_run_output <link>shared ] 69 [ run structures_tests.cpp ] 70 [ run library_info_test.cpp ../example/tutorial4/static_plugin.cpp : : test_library : <test-info>always_show_run_output <link>shared ] 71 [ run empty_library_info_test.cpp : : empty_library : <test-info>always_show_run_output <link>shared ] 72 [ run ../example/getting_started.cpp : : getting_started_library : <link>shared ] 73 [ run ../example/tutorial1/tutorial1.cpp : : my_plugin_sum : <link>shared ] 74 [ run ../example/tutorial2/tutorial2.cpp : : my_plugin_aggregator : <link>shared ] 75 [ run ../example/tutorial3/tutorial3.cpp : : my_plugin_aggregator my_plugin_sum : <link>shared ] 76 [ run ../example/tutorial4/load_self.cpp ../example/tutorial4/static_plugin.cpp 77 : : : <variant>release $(RDYNAMIC) 78 ] 79 [ run ../example/tutorial5/load_all.cpp ../example/tutorial4/static_plugin.cpp 80 : : getting_started_library my_plugin_aggregator my_plugin_sum : $(RDYNAMIC) <link>shared 81 ] 82 [ run ../example/tutorial6/tutorial6.cpp : : on_unload_lib : <link>shared ] 83 [ run ../example/tutorial7/tutorial7.cpp : : library1 library2 : <link>shared ] 84 [ run ../example/tutorial8/tutorial8.cpp : : refcounting_plugin : <link>shared ] 85 [ run ../example/tutorial8/tutorial8_static.cpp : : : <link>static <variant>release $(RDYNAMIC) <test-info>always_show_run_output <library>static_refcounting_plugin 86 # Known problem: unsupported __dllexport__ with weak symbols + GNU linker features (no non-weak unresolved symbols in executable => no need to link libraries) 87 <target-os>windows,<toolset>gcc:<build>no 88 ] 89 [ run ../example/tutorial9/tutorial9.cpp ] 90 # test for shared libraries 91 [ compile-fail section_name_too_big.cpp ] 92 [ run shared_library_concurrent_load_test.cpp /boost/thread//boost_thread : : library1 library2 my_plugin_aggregator refcounting_plugin : <link>shared ] 93 [ run cpp_mangle_test.cpp : : cpp_plugin ] 94 [ run cpp_load_test.cpp : : cpp_plugin ] 95 [ run cpp_import_test.cpp : : cpp_plugin ] 96 [ run template_method_linux_test.cpp : : cpp_plugin ] 97 # TODO: uncomment (fails on some MSVCs and Clang-5) 98 #[ run ctti_type_name_parser_test.cpp : : cpp_mangle_plugin ] 99 ; 100} 101