2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 04:57:52 +00:00

[#3732] Use gtest wrap

This commit is contained in:
Andrei Pavel 2025-04-10 22:50:20 +03:00
parent e8d899529d
commit 7b84174709
No known key found for this signature in database
GPG Key ID: D4E804481939CB21

View File

@ -244,15 +244,11 @@ if netconf_opt.enabled() and NETCONF_DEP.get_variable(
error('Dependency not found: NETCONF.') error('Dependency not found: NETCONF.')
endif endif
# GTEST_DEP = dependency( GTEST_DEP = dependency(
# 'gtest', 'gtest',
# required: TESTS_OPT.enabled() or FUZZ_OPT.enabled(), fallback: ['gtest', 'gtest_dep'],
# ) required: TESTS_OPT.enabled() or FUZZ_OPT.enabled(),
GTEST_DEP = disabler() )
if TESTS_OPT.enabled() or FUZZ_OPT.enabled()
gtest_proj = subproject('gtest')
GTEST_DEP = gtest_proj.get_variable('gtest_dep')
endif
# Crypto # Crypto
if crypto_opt == 'botan' if crypto_opt == 'botan'
@ -476,13 +472,16 @@ conf_data.set('HAVE_AFL', have_afl)
if GTEST_DEP.found() if GTEST_DEP.found()
# Wrap dependencies cannot be used in compiler checks: https://github.com/mesonbuild/meson/issues/11575 # Wrap dependencies cannot be used in compiler checks: https://github.com/mesonbuild/meson/issues/11575
# We can safely assume that googletest 1.15.2 has CreateUnifiedDiff though. # We can safely assume that googletest 1.15.2 has CreateUnifiedDiff though.
# result = cpp.run( if GTEST_DEP.type_name() == 'internal'
# fs.read('compiler-checks/have-create-unified-diff.cc'),
# name: 'HAVE_CREATE_UNIFIED_DIFF',
# dependencies: [GTEST_DEP],
# )
# conf_data.set('HAVE_CREATE_UNIFIED_DIFF', result.returncode() == 0)
conf_data.set('HAVE_CREATE_UNIFIED_DIFF', true) conf_data.set('HAVE_CREATE_UNIFIED_DIFF', true)
else
result = cpp.run(
fs.read('compiler-checks/have-create-unified-diff.cc'),
name: 'HAVE_CREATE_UNIFIED_DIFF',
dependencies: [GTEST_DEP],
)
conf_data.set('HAVE_CREATE_UNIFIED_DIFF', result.returncode() == 0)
endif
endif endif
if KRB5_DEP.found() if KRB5_DEP.found()