diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-09-03 20:10:21 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-09-04 01:01:35 +0200 |
| commit | 844c7cf3bbf9c1607b329a00bbffc3ea86a0ddab (patch) | |
| tree | 4d0b7737159f084dd4f0edd0b5a64d1d327caae0 /wscript | |
| parent | 5defe5065789beeb903bcf65de05dd4468079ea7 (diff) | |
Cater for static boost properly and note that Ubuntu 16.04 uses it.v0.17.10
Diffstat (limited to 'wscript')
| -rw-r--r-- | wscript | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -40,6 +40,7 @@ def options(opt): opt.add_option('--target-windows-32', action='store_true', default=False, help='set up to do a cross-compile to Windows 32-bit') opt.add_option('--enable-debug', action='store_true', default=False, help='build with debugging information and without optimisation') opt.add_option('--static', action='store_true', default=False, help='build statically') + opt.add_option('--static-boost', action='store_true', default=False, help='link statically against boost') opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests') opt.add_option('--c++17', action='store_true', default=False, help='build with C++17 and libxml++-4.0') @@ -71,6 +72,9 @@ def configure(conf): boost_lib_suffix = '' conf.env.append_value('CXXFLAGS', '-DLIBCXML_POSIX') + if not conf.options.static_boost: + conf.env.append_value('CXXFLAGS', '-DBOOST_TEST_DYN_LINK') + conf.check_cfg(package='libxml++-' + conf.env.XMLPP_API, args='--cflags --libs', uselib_store='LIBXML++', mandatory=True) conf.check_cxx(fragment=""" @@ -86,7 +90,7 @@ def configure(conf): conf.check_cxx(fragment=""" #define BOOST_TEST_MODULE Config test\n #include <boost/test/unit_test.hpp>\n - int main() {} + BOOST_AUTO_TEST_CASE(foo) {} """, msg='Checking for boost unit testing library', lib=['boost_unit_test_framework%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], |
