diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-09-03 20:11:35 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-09-04 01:05:16 +0200 |
| commit | 604a4e41b60f575fa3a0573aba5170c4d0f331eb (patch) | |
| tree | 82f67e33a6b05373aed64547fd1394eeb2a2fd3e | |
| parent | 13c738a189e574b80c2b8eca9baa485264664dde (diff) | |
Allow libcxml and libdcp builds with static boost.v1.9.16
| -rw-r--r-- | cscript | 4 | ||||
| -rw-r--r-- | test/test.cc | 3 | ||||
| -rw-r--r-- | test/wscript | 2 | ||||
| -rw-r--r-- | wscript | 4 |
4 files changed, 10 insertions, 3 deletions
@@ -36,7 +36,7 @@ import shutil def dependencies(target, options): deps = [ - ('libcxml', 'v0.17.9', options), + ('libcxml', 'v0.17.10', options), ('openjpeg', 'ad8edaacd54a862940d0a77c41ecda5858b54d6e'), ('asdcplib', 'v1.0.2') ] @@ -59,6 +59,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 == 'centos' or (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 2cde0776..65649efd 100644 --- a/test/test.cc +++ b/test/test.cc @@ -31,8 +31,9 @@ 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" #include "dcp.h" diff --git a/test/wscript b/test/wscript index 64b3ed59..13493f1e 100644 --- a/test/wscript +++ b/test/wscript @@ -42,7 +42,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, @@ -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-dcpomatic') + 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') @@ -111,6 +112,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']) |
