summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2021-02-07 10:10:14 (GMT)
committerRaul Tambre <raul@tambre.ee>2021-02-25 16:22:32 (GMT)
commitb9c3acac02b6202359e6964853521878e386ed06 (patch)
treee815e577b737b8b55dea2a64f5c08f34a29b5ae5 /Modules/Compiler
parentc9f0613c2ace0714a48caf793889eedc605894ce (diff)
downloadCMake-b9c3acac02b6202359e6964853521878e386ed06.zip
CMake-b9c3acac02b6202359e6964853521878e386ed06.tar.gz
CMake-b9c3acac02b6202359e6964853521878e386ed06.tar.bz2
GNU: C23 support
Added in commit 9f936c861383dc69e0053e34315d5d0262a19e8f, released in 9.1.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/GNU-C.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index 4094717..39e9c72 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -41,4 +41,9 @@ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.1)
set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std=gnu17")
endif()
+if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 9.1)
+ set(CMAKE_C23_STANDARD_COMPILE_OPTION "-std=c23")
+ set(CMAKE_C23_EXTENSION_COMPILE_OPTION "-std=gnu23")
+endif()
+
__compiler_check_default_language_standard(C 3.4 90 5.0 11 8.1 17)