From b9c3acac02b6202359e6964853521878e386ed06 Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sun, 7 Feb 2021 12:10:14 +0200 Subject: GNU: C23 support Added in commit 9f936c861383dc69e0053e34315d5d0262a19e8f, released in 9.1. --- Modules/Compiler/GNU-C.cmake | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v0.12