Skip to content
Snippets Groups Projects
Commit 3790a034 authored by Florian Fischer's avatar Florian Fischer
Browse files

[test] use gtest meson wrap if gtest is not found

The gtest wrap can be updated with the meson wrap command
parent 0de95a3c
Branches
No related tags found
No related merge requests found
Pipeline #57630 passed
......@@ -4,3 +4,6 @@
/build-*/
/.cache/
subprojects/packagecache/
subprojects/googletest*
[wrap-file]
directory = googletest-release-1.10.0
source_url = https://github.com/google/googletest/archive/release-1.10.0.zip
source_filename = gtest-1.10.0.zip
source_hash = 94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91
patch_url = https://wrapdb.mesonbuild.com/v1/projects/gtest/1.10.0/1/get_zip
patch_filename = gtest-1.10.0-1-wrap.zip
patch_hash = 04ff14e8880e4e465f6260221e9dfd56fea6bc7cce4c4aff0dc528e4a2c8f514
......@@ -170,7 +170,13 @@ parallel_ok = (not io_uring_enabled)
# Meson integration for GTest and GMock
# See https://mesonbuild.com/Dependencies.html#gtest-and-gmock
gtest_dep = dependency('gtest', main: true)
gtest_dep = dependency('gtest', main: true, required: false)
# If gtest is not available on the system use the meson wrap provided
# by WrapDB and build it ourself
if not gtest_dep.found()
gtest_sp = subproject('gtest')
gtest_dep = gtest_sp.get_variable('gtest_main_dep')
endif
foreach source, test_dict : tests
# TODO: Use meson fs (filesystem) module once meson >= 0.53 is in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment