mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 09:57:41 +00:00
[#3732] Use gtest wrap
This commit is contained in:
parent
d226b29fd3
commit
bdf37d0d3f
28
meson.build
28
meson.build
@ -244,10 +244,15 @@ 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(),
|
# 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'
|
||||||
@ -469,12 +474,15 @@ endif
|
|||||||
conf_data.set('HAVE_AFL', have_afl)
|
conf_data.set('HAVE_AFL', have_afl)
|
||||||
|
|
||||||
if GTEST_DEP.found()
|
if GTEST_DEP.found()
|
||||||
result = cpp.run(
|
# Wrap dependencies cannot be used in compiler checks: https://github.com/mesonbuild/meson/issues/11575
|
||||||
fs.read('compiler-checks/have-create-unified-diff.cc'),
|
# We can safely assume that googletest 1.15.2 has CreateUnifiedDiff though.
|
||||||
name: 'HAVE_CREATE_UNIFIED_DIFF',
|
# result = cpp.run(
|
||||||
dependencies: [GTEST_DEP],
|
# fs.read('compiler-checks/have-create-unified-diff.cc'),
|
||||||
)
|
# name: 'HAVE_CREATE_UNIFIED_DIFF',
|
||||||
conf_data.set('HAVE_CREATE_UNIFIED_DIFF', result.returncode() == 0)
|
# dependencies: [GTEST_DEP],
|
||||||
|
# )
|
||||||
|
# conf_data.set('HAVE_CREATE_UNIFIED_DIFF', result.returncode() == 0)
|
||||||
|
conf_data.set('HAVE_CREATE_UNIFIED_DIFF', true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if KRB5_DEP.found()
|
if KRB5_DEP.found()
|
||||||
|
2
subprojects/.gitignore
vendored
Normal file
2
subprojects/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/googletest-1.15.2
|
||||||
|
/packagecache
|
16
subprojects/gtest.wrap
Normal file
16
subprojects/gtest.wrap
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = googletest-1.15.2
|
||||||
|
source_url = https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz
|
||||||
|
source_filename = gtest-1.15.2.tar.gz
|
||||||
|
source_hash = 7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926
|
||||||
|
patch_filename = gtest_1.15.2-4_patch.zip
|
||||||
|
patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.15.2-4/get_patch
|
||||||
|
patch_hash = a5151324b97e6a98fa7a0e8095523e6d5c4bb3431210d6ac4ad9800c345acf40
|
||||||
|
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/gtest_1.15.2-4/gtest-1.15.2.tar.gz
|
||||||
|
wrapdb_version = 1.15.2-4
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
gtest = gtest_dep
|
||||||
|
gtest_main = gtest_main_dep
|
||||||
|
gmock = gmock_dep
|
||||||
|
gmock_main = gmock_main_dep
|
Loading…
x
Reference in New Issue
Block a user