aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-01-31 03:44:18 -0800
committerChris Robinson <[email protected]>2023-01-31 03:44:18 -0800
commit4021cccc3e735d707be83fd431473f57614a13d7 (patch)
tree3a54020ae0dc41037837c87b6c994978dc58b88a
parenta461d5f0a3f7b1844ef84591826cf5c1065cc11c (diff)
Try -Wno-c++20-extensions if -Wno-c++20-attribute-extensions fails
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9a2c859..1b181cac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -270,6 +270,11 @@ else()
check_cxx_compiler_flag(-Wno-c++20-attribute-extensions HAVE_WNO_CXX20_ATTR_EXT)
if(HAVE_WNO_CXX20_ATTR_EXT)
set(C_FLAGS ${C_FLAGS} $<$<COMPILE_LANGUAGE:CXX>:-Wno-c++20-attribute-extensions>)
+ else()
+ check_cxx_compiler_flag(-Wno-c++20-extensions HAVE_WNO_CXX20_EXT)
+ if(HAVE_WNO_CXX20_EXT)
+ set(C_FLAGS ${C_FLAGS} $<$<COMPILE_LANGUAGE:CXX>:-Wno-c++20-extensions>)
+ endif()
endif()
if(ALSOFT_WERROR)