diff options
| -rw-r--r-- | cscript | 2 | ||||
| -rw-r--r-- | test/test.cc | 2 | ||||
| -rw-r--r-- | wscript | 4 |
3 files changed, 7 insertions, 1 deletions
@@ -44,6 +44,8 @@ def build(target, options): if target.distro != 'ubuntu' or not target.version in ('16.04', '22.04'): # We only build tests on Ubuntu 16.04 and 22.04 cmd += ' --disable-tests' + if target.distro == 'ubuntu' and target.version == '16.04': + cmd += ' --static-boost' elif target.platform == 'windows': cmd += f' --target-windows-{target.bits}' diff --git a/test/test.cc b/test/test.cc index d384bdfa..fcd2d226 100644 --- a/test/test.cc +++ b/test/test.cc @@ -31,7 +31,7 @@ files in the program, then also delete it here. */ -#define BOOST_TEST_DYN_LINK + #define BOOST_TEST_MODULE libdcp_test #include "compose.hpp" #include "cpl.h" @@ -60,6 +60,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 libdcp statically, and link statically to openjpeg, cxml, asdcplib-carl') + opt.add_option('--static-boost', action='store_true', default=False, help='link statically to boost') opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests') opt.add_option('--disable-benchmarks', action='store_true', default=False, help='disable building of benchmarks') opt.add_option('--enable-gcov', action='store_true', default=False, help='use gcov in tests') @@ -102,6 +103,9 @@ def configure(conf): elif int(gcc[0]) > 4: conf.env.append_value('CXXFLAGS', ['-Wsuggest-override']) + if not conf.options.static_boost: + conf.env.append_value('CXXFLAGS', '-DBOOST_TEST_DYN_LINK') + # Disable libxml++ deprecation warnings for now conf.env.append_value('CXXFLAGS', ['-Wno-deprecated-declarations']) |
