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 <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2022-05-10 17:26:47 +01:00
parent df865c349a
commit f5f1cfc572

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)