Skip to content

Commit 4b02b50

Browse files
committed
Fix compiler warning on fetched googletest on fedora:rawhide with latest clang
1 parent b68bf74 commit 4b02b50

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

autotest/cpp/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ else()
6363

6464
add_library(gtest_for_gdal ALIAS gtest)
6565

66+
# Force CXX_STANDARD=14 otherwise with clang 19.1.6, one gets
67+
# In file included from /home/runner/work/gdal/gdal/build-fedora_rawhide/autotest/cpp/googletest-src/googletest/include/gtest/internal/gtest-port.h:295:
68+
# /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ciso646:46:4: error: "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror,-W#warnings]
69+
set_target_properties(gtest PROPERTIES CXX_STANDARD 14)
70+
6671
endif() # USE_EXTERNAL_GTEST
6772

6873

0 commit comments

Comments
 (0)