From d00cc32f8b1ed85d22309fac10576a1baf8a4736 Mon Sep 17 00:00:00 2001 From: Serge Lamikhov-Center Date: Thu, 15 Dec 2022 19:07:46 +0200 Subject: [PATCH] Switch to a newer 'googletest' archive --- tests/CMakeLists.txt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8b1ec0b..c65d3d1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,9 +1,18 @@ include(FetchContent) -FetchContent_Declare( - googletest - URL https://github.com/google/googletest/archive/9a32aee22d771387c494be2d8519fbdf46a713b2.zip -) +if(${CMAKE_VERSION} VERSION_LESS "3.24.0") + FetchContent_Declare( + googletest + URL https://github.com/google/googletest/archive/41fe6be7d738237d1ca53070bd6ddebb73190b58.zip + ) +else() + FetchContent_Declare( + googletest + URL https://github.com/google/googletest/archive/41fe6be7d738237d1ca53070bd6ddebb73190b58.zip + FIND_PACKAGE_ARGS NAMES GTest + DOWNLOAD_EXTRACT_TIMESTAMP = TRUE + ) +endif() # For Windows: Prevent overriding the parent project's compiler/linker settings set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)