From c45d11bed9c1c7865f464cdc851e60f056d443f2 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 16 Jan 2025 16:09:29 +0100 Subject: [PATCH] Fix compiler warning on fetched googletest on fedora:rawhide with latest clang --- autotest/cpp/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autotest/cpp/CMakeLists.txt b/autotest/cpp/CMakeLists.txt index 74f10ca99290..9fa22816a67a 100644 --- a/autotest/cpp/CMakeLists.txt +++ b/autotest/cpp/CMakeLists.txt @@ -63,6 +63,11 @@ else() add_library(gtest_for_gdal ALIAS gtest) + # Force CXX_STANDARD=14 otherwise with clang 19.1.6, one gets + # In file included from /home/runner/work/gdal/gdal/build-fedora_rawhide/autotest/cpp/googletest-src/googletest/include/gtest/internal/gtest-port.h:295: + # /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ciso646:46:4: error: " is deprecated in C++17, use to detect implementation-specific macros" [-Werror,-W#warnings] + set_target_properties(gtest PROPERTIES CXX_STANDARD 14) + endif() # USE_EXTERNAL_GTEST