mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 01:49:48 +00:00
[#3732] Use gtest wrap
This commit is contained in:
parent
e8d899529d
commit
7b84174709
31
meson.build
31
meson.build
@ -244,15 +244,11 @@ if netconf_opt.enabled() and NETCONF_DEP.get_variable(
|
||||
error('Dependency not found: NETCONF.')
|
||||
endif
|
||||
|
||||
# GTEST_DEP = dependency(
|
||||
# 'gtest',
|
||||
# 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
|
||||
GTEST_DEP = dependency(
|
||||
'gtest',
|
||||
fallback: ['gtest', 'gtest_dep'],
|
||||
required: TESTS_OPT.enabled() or FUZZ_OPT.enabled(),
|
||||
)
|
||||
|
||||
# Crypto
|
||||
if crypto_opt == 'botan'
|
||||
@ -476,13 +472,16 @@ conf_data.set('HAVE_AFL', have_afl)
|
||||
if GTEST_DEP.found()
|
||||
# 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.
|
||||
# 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)
|
||||
conf_data.set('HAVE_CREATE_UNIFIED_DIFF', true)
|
||||
if GTEST_DEP.type_name() == 'internal'
|
||||
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
|
||||
|
||||
if KRB5_DEP.found()
|
||||
|
Loading…
x
Reference in New Issue
Block a user