|
|
@@ -28,4 +28,14 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
|
|
|
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
|
|
|
endif()
|
|
|
|
|
|
-__compiler_check_default_language_standard(C 4.0 99)
|
|
|
+if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
|
|
|
+ set(CMAKE_C17_STANDARD_COMPILE_OPTION "-std=c17")
|
|
|
+ set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std=gnu17")
|
|
|
+endif()
|
|
|
+
|
|
|
+if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0.3)
|
|
|
+ set(CMAKE_C23_STANDARD_COMPILE_OPTION "-std=c2x")
|
|
|
+ set(CMAKE_C23_EXTENSION_COMPILE_OPTION "-std=gnu2x")
|
|
|
+endif()
|
|
|
+
|
|
|
+__compiler_check_default_language_standard(C 4.0 99 9.1 11 12.0.5 17)
|