Skip to content

Commit 3d8c7c3

Browse files
committed
Won't use Werror on GCC12
1 parent bc41616 commit 3d8c7c3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ target_compile_features(glz_test_common INTERFACE cxx_std_23)
2323
target_link_libraries(glz_test_common INTERFACE ut::ut glaze::glaze)
2424
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
2525
target_compile_options(glz_test_common INTERFACE -fno-exceptions -fno-rtti)
26-
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
26+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
27+
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12)
28+
target_compile_options(glz_test_common INTERFACE -Wall -Wextra -pedantic $<$<CONFIG:Debug>:-Werror>)
29+
else()
30+
target_compile_options(glz_test_common INTERFACE -Wall -Wextra -pedantic)
31+
endif()
32+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
2733
target_compile_options(glz_test_common INTERFACE -Wall -Wextra -pedantic $<$<CONFIG:Debug>:-Werror>)
2834
else()
2935
target_compile_options(glz_test_common INTERFACE -Wall -Wextra -pedantic)

0 commit comments

Comments
 (0)