mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 13:04:15 -04:00
fix: ensure gtest target exists so ricepp won't fetch it (fixes gh #194)
This commit is contained in:
parent
5ede1fb84d
commit
f713084f84
@ -354,7 +354,13 @@ set(ZSTD_LIBRARY_DEBUG
|
||||
CACHE FILEPATH "don't build folly with zstd" FORCE)
|
||||
|
||||
if(WITH_TESTS)
|
||||
if(NOT PREFER_SYSTEM_GTEST)
|
||||
if(PREFER_SYSTEM_GTEST)
|
||||
find_package(GTest 1.13.0 CONFIG REQUIRED)
|
||||
add_library(gtest ALIAS GTest::gtest)
|
||||
add_library(gtest_main ALIAS GTest::gtest_main)
|
||||
add_library(gmock ALIAS GTest::gmock)
|
||||
add_library(gmock_main ALIAS GTest::gmock_main)
|
||||
else()
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
|
@ -155,6 +155,7 @@ endif()
|
||||
|
||||
if(WITH_TESTS)
|
||||
if(NOT TARGET gtest)
|
||||
message(STATUS "[ricepp] fetching googletest")
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
GIT_REPOSITORY https://github.com/google/googletest.git
|
||||
|
Loading…
x
Reference in New Issue
Block a user