Additional CMake flag for controlling C standard

Disable compiler-specific extensions (e.g. use --std=c11 instead
of --std=gnu11).

Signed-off-by: Dave Rodgman <[email protected]>
This commit is contained in:
Dave Rodgman
2022-05-11 16:26:18 +00:00
parent df865c349a
commit f5f1cfc572
+1
View File
@@ -170,6 +170,7 @@ string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")
include(CheckCCompilerFlag)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 99)
if(CMAKE_COMPILER_IS_GNU)