From: Fred Morcos Date: Mon, 27 Nov 2023 10:45:26 +0000 (+0100) Subject: Meson: Refactor boost test handling X-Git-Tag: rec-5.1.0-alpha1~80^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1bc1ce49a83b01466f03365b99861ce8e2ef198;p=thirdparty%2Fpdns.git Meson: Refactor boost test handling --- diff --git a/meson.build b/meson.build index 4d7b4e568b..ac5eb6053d 100644 --- a/meson.build +++ b/meson.build @@ -57,6 +57,7 @@ subdir('meson' / 'ipcipher') # IPCipher subdir('meson' / 'clock-gettime') # Clock_gettime subdir('meson' / 'boost') # Boost subdir('meson' / 'boost-program-options') # Boost Program Options Library +subdir('meson' / 'boost-test') # Boost Testing Library subdir('meson' / 'reproducible') # Reproducible Builds subdir('meson' / 'dlopen') # dlopen subdir('meson' / 'verbose-logging') # Verbose Logging @@ -71,10 +72,6 @@ subdir('meson' / 'socket-dir') # Socket Dir subdir('meson' / 'various-functions') # Various Functions subdir('meson' / 'various-headers') # Various Headers -if get_option('unit-tests') or get_option('unit-tests-backends') - subdir('meson' / 'boost-test') -endif - if get_option('module-geoip') != 'disabled' or get_option('tools-ixfrdist') subdir('meson' / 'yaml-cpp') endif @@ -174,9 +171,6 @@ deps += get_variable('dep_sqlite3', dependency('', required: false)) # Add the yaml-cpp dependency for geoip and ixfrdist. deps += get_variable('dep_yaml_cpp', dependency('', required: false)) -# Add the boost-test dependency for unit tests and backend unit tests. -deps += get_variable('dep_boost_test', dependency('', required: false)) - subdir('pdns') selected_modules = [] diff --git a/meson/boost-test/meson.build b/meson/boost-test/meson.build index 1af8127766..1d7af1e8a0 100644 --- a/meson/boost-test/meson.build +++ b/meson/boost-test/meson.build @@ -1,2 +1,5 @@ -dep_boost_test = dependency('boost', modules: ['unit_test_framework'], required: true) -summary('Test', dep_boost_test.found(), bool_yn: true, section: 'Boost') +dep_boost_test = dependency('', required: false) +if get_option('unit-tests') or get_option('unit-tests-backends') + dep_boost_test = dependency('boost', modules: ['unit_test_framework'], required: true) + summary('Test', dep_boost_test.found(), bool_yn: true, section: 'Boost') +endif diff --git a/pdns/meson.build b/pdns/meson.build index 8b602801ef..b8b80a9923 100644 --- a/pdns/meson.build +++ b/pdns/meson.build @@ -1622,6 +1622,7 @@ if get_option('unit-tests') ], 'deps': [ deps, + dep_boost_test, libpdns_bind_parser, libpdns_dnslabeltext, libpdns_pkcs11signers,