]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Clean up some boost and unit test handling
authorFred Morcos <fred.morcos@open-xchange.com>
Thu, 6 Jul 2023 12:09:16 +0000 (14:09 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:28 +0000 (13:28 +0100)
meson.build
meson/boost/meson.build
meson/unit-tests/meson.build

index 6f92fa07d33709a14b26288e1c6094db89938987..ead054a8de1761f04ab361e44787d0b0d4a2d318 100644 (file)
@@ -59,14 +59,17 @@ endif
 
 # Boost Program Options library
 dep_boost_program_options = dependency('boost', modules: ['program_options'], required: true)
-summary('Boost Program Options', dep_boost_program_options.found(), bool_yn: true, section: 'Boost')
+deps += dep_boost_program_options
+summary('Program Options', dep_boost_program_options.found(), bool_yn: true, section: 'Boost')
 
 # Backend Unit Tests
 opt_backend_unittests = get_option('backend-unit-tests')
 dep_boost_test = dependency('boost', modules: ['unit_test_framework'], required: opt_backend_unittests)
-conf.set10('BACKEND_UNIT_TESTS', dep_boost_test.found(), description: 'Whether backend unit tests are enabled')
-# There's no need for a summary() here because the summary regarding the Boost.Test
-# framework was already printed as part of the meson/unit-tests subdir.
+deps += dep_boost_test
+conf.set10('BACKEND_UNIT_TESTS', opt_backend_unittests, description: 'Whether backend unit tests are enabled')
+if not opt_unittests
+  summary('Test', dep_boost_test.found(), bool_yn: true, section: 'Boost')
+endif
 
 # Sqlite3
 opt_sqlite3 = get_option('sqlite3')
index f5a11c44fb27dab1882700d0fb8b5663867cd7d8..f8e15babe21c9e31c3a80df749f84d3d7b40e961 100644 (file)
@@ -1,9 +1,10 @@
 # Boost
-# Inputs: conf
+# Inputs: conf deps
 
 dep_boost = dependency('boost', version: '>= 1.42', required: true)
+deps += dep_boost
 # Boost accumulators, as used by dnsbulktest and dnstcpbench, need 1.48+ to be compatible
 # with C++11.
 conf.set10('HAVE_BOOST_GE_148', dep_boost.version().version_compare('>= 1.48.0'), description: 'Whether the boost version is >= 1.48.0')
 summary('Boost', dep_boost.found(), bool_yn: true, section: 'Configuration')
-summary('Boost Version', dep_boost.version(), section: 'Boost')
+summary('Version', dep_boost.version(), section: 'Boost')
index 40c56c09b20cbd293ca069fbbcbcb2c367606b00..bacb14f59678eac13201bb3f9e4646ef88fba6dd 100644 (file)
@@ -1,7 +1,11 @@
 # Unit Tests
-# Inputs: conf
+# Inputs: conf deps
+# Outputs: opt_unittests
 
 opt_unittests = get_option('unit-tests')
 dep_boost_test = dependency('boost', modules: ['unit_test_framework'], required: opt_unittests)
-conf.set10('UNIT_TESTS', dep_boost_test.found(), description: 'Whether unit tests are enabled')
-summary('Boost Test', dep_boost_test.found(), bool_yn: true, section: 'Boost')
+deps += dep_boost_test
+conf.set10('UNIT_TESTS', opt_unittests, description: 'Whether unit tests are enabled')
+if opt_unittests
+  summary('Test', dep_boost_test.found(), bool_yn: true, section: 'Boost')
+endif