From 158130776c7c206800b2302b8fafe050db494003 Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Sun, 11 Aug 2024 15:03:28 +0300 Subject: [PATCH] Upgrade google libraries (#46) --- tests/CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0774e20..d0d4893 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,7 +12,7 @@ endif() include(FetchContent) if (NOT googletest_POPULATED) - FetchContent_Declare(googletest URL https://github.com/google/googletest/archive/release-1.11.0.zip) + FetchContent_Declare(googletest URL https://github.com/google/googletest/archive/refs/tags/v1.15.2.zip) FetchContent_MakeAvailable(googletest) endif () @@ -40,12 +40,18 @@ package_add_test(channel_test11 channel_test.cpp blocking_iterator_test.cpp) package_add_test(channel_test14 channel_test.cpp blocking_iterator_test.cpp) package_add_test(channel_test17 channel_test.cpp blocking_iterator_test.cpp) -set_target_properties(channel_test14 PROPERTIES CXX_STANDARD 14 CMAKE_CXX_STANDARD_REQUIRED YES) -set_target_properties(channel_test17 PROPERTIES CXX_STANDARD 17 CMAKE_CXX_STANDARD_REQUIRED YES) +set_target_properties(channel_test14 PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED YES) +set_target_properties(channel_test17 PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED YES) + +if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + # Disable warnings about C++17 extensions + target_compile_options(channel_test11 PRIVATE -Wno-c++17-extensions) + target_compile_options(channel_test14 PRIVATE -Wno-c++17-extensions) +endif() # Benchmark if (NOT benchmark_POPULATED) - FetchContent_Declare(benchmark URL https://github.com/google/benchmark/archive/v1.6.1.zip) + FetchContent_Declare(benchmark URL https://github.com/google/benchmark/archive/refs/tags/v1.8.5.zip) FetchContent_MakeAvailable(benchmark) endif ()