]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Unit Tests
authorFred Morcos <fred.morcos@open-xchange.com>
Thu, 6 Jul 2023 07:42:12 +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/unit-tests/meson.build [new file with mode: 0644]
meson_options.txt

index 41255974bb1a65289712e691dd057885dc69a4dd..65c8f4abb7fc23ca06988511d0bec8ad59b3ceb5 100644 (file)
@@ -44,6 +44,7 @@ subdir('meson/ipcipher')        # IPCipher
 subdir('meson/ragel')           # Find Ragel
 subdir('meson/clock-gettime')   # Clock_gettime
 subdir('meson/boost')           # Boost
+subdir('meson/unit-tests')      # Unit Tests
 
 # Boost Program Options library
 dep_boost_program_options = dependency('boost', modules: ['program_options'], required: true)
diff --git a/meson/unit-tests/meson.build b/meson/unit-tests/meson.build
new file mode 100644 (file)
index 0000000..40c56c0
--- /dev/null
@@ -0,0 +1,7 @@
+# Unit Tests
+# Inputs: conf
+
+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')
index 4701f63efe6e387e265609036879096a5da91cc7..a025fa23c66b933fb46db418a56026eda9616b11 100644 (file)
@@ -9,3 +9,4 @@ option('libssl', type: 'feature', value: 'auto', description: 'Build support for
 option('gnutls', type: 'feature', value: 'auto', description: 'Build support for GnuTLS')
 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')