From: Fred Morcos Date: Thu, 6 Jul 2023 07:42:12 +0000 (+0200) Subject: Meson: Unit Tests X-Git-Tag: rec-5.1.0-alpha1~80^2~356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9b35b00b49fe31019afe8a39bebee264837df57;p=thirdparty%2Fpdns.git Meson: Unit Tests --- diff --git a/meson.build b/meson.build index 41255974bb..65c8f4abb7 100644 --- a/meson.build +++ b/meson.build @@ -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 index 0000000000..40c56c09b2 --- /dev/null +++ b/meson/unit-tests/meson.build @@ -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') diff --git a/meson_options.txt b/meson_options.txt index 4701f63efe..a025fa23c6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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')