]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Auth backend unit tests
authorFred Morcos <fred.morcos@open-xchange.com>
Thu, 6 Jul 2023 07:42:20 +0000 (09:42 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:27 +0000 (13:28 +0100)
meson.build
meson_options.txt

index 65c8f4abb7fc23ca06988511d0bec8ad59b3ceb5..5ade7ea8665d6e5432316ea4d2c0fecb5c387af4 100644 (file)
@@ -50,6 +50,13 @@ subdir('meson/unit-tests')      # Unit Tests
 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')
 
+# 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.
+
 # Find or generate pdns/dnslabeltext.cc
 if not ragel.found() and not fs.exists('pdns/dnslabeltext.cc')
   error('Ragel is missing and `pdns/dnslabeltext.cc` cannot be found. ' +
index a025fa23c66b933fb46db418a56026eda9616b11..66065b813cc8c6ae91bdacdd983daa57ba501968 100644 (file)
@@ -10,3 +10,4 @@ option('gnutls', type: 'feature', value: 'auto', description: 'Build support for
 option('dns-over-tls', type: 'boolean', value: false, description: 'Enable DNS over TLS (requires GnuTLS or OpenSSL)')
 option('ipcipher', type: 'feature', value: 'auto', description: 'Enable ipcipher support (requires libcrypto)')
 option('unit-tests', type: 'boolean', value: false, description: 'Enable building unit tests')
+option('backend-unit-tests', type: 'boolean', value: false, description: 'Enable building backend unit tests')