Commit 983533a4 authored by Robert Maynard's avatar Robert Maynard

Record when C compilers have gained full support for 90,99,11

parent f92ccbc3
...@@ -4,12 +4,15 @@ __compiler_clang(C) ...@@ -4,12 +4,15 @@ __compiler_clang(C)
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0) if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
endif() endif()
__compiler_check_default_language_standard(C 4.0 99) __compiler_check_default_language_standard(C 4.0 99)
...@@ -10,12 +10,15 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) ...@@ -10,12 +10,15 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
else() else()
# clang-cl doesn't have any of these # clang-cl doesn't have any of these
set(CMAKE_C90_STANDARD_COMPILE_OPTION "") set(CMAKE_C90_STANDARD_COMPILE_OPTION "")
......
...@@ -10,11 +10,14 @@ string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") ...@@ -10,11 +10,14 @@ string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.1) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.1)
set(CMAKE_C90_STANDARD_COMPILE_OPTION -h noc99,conform) set(CMAKE_C90_STANDARD_COMPILE_OPTION -h noc99,conform)
set(CMAKE_C90_EXTENSION_COMPILE_OPTION -h noc99,gnu) set(CMAKE_C90_EXTENSION_COMPILE_OPTION -h noc99,gnu)
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION -h c99,conform) set(CMAKE_C99_STANDARD_COMPILE_OPTION -h c99,conform)
set(CMAKE_C99_EXTENSION_COMPILE_OPTION -h c99,gnu) set(CMAKE_C99_EXTENSION_COMPILE_OPTION -h c99,gnu)
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.5) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.5)
set(CMAKE_C11_STANDARD_COMPILE_OPTION -h std=c11,conform) set(CMAKE_C11_STANDARD_COMPILE_OPTION -h std=c11,conform)
set(CMAKE_C11_EXTENSION_COMPILE_OPTION -h std=c11,gnu) set(CMAKE_C11_EXTENSION_COMPILE_OPTION -h std=c11,gnu)
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
endif () endif ()
endif () endif ()
......
...@@ -10,13 +10,16 @@ elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) ...@@ -10,13 +10,16 @@ elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
endif() endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
endif() endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7) if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c1x") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c1x")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu1x") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu1x")
......
...@@ -12,13 +12,16 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") ...@@ -12,13 +12,16 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 16.0.0) if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 16.0.0)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-Qstd=c11") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-Qstd=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-Qstd=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-Qstd=c11")
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
endif() endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0) if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-Qstd=c89") set(CMAKE_C90_STANDARD_COMPILE_OPTION "-Qstd=c89")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-Qstd=c89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-Qstd=c89")
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-Qstd=c99") set(CMAKE_C99_STANDARD_COMPILE_OPTION "-Qstd=c99")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-Qstd=c99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-Qstd=c99")
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
endif() endif()
else() else()
...@@ -26,13 +29,16 @@ else() ...@@ -26,13 +29,16 @@ else()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
endif() endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0) if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89") set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89")
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
endif() endif()
endif() endif()
......
...@@ -6,11 +6,14 @@ string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") ...@@ -6,11 +6,14 @@ string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.10) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.10)
set(CMAKE_C90_STANDARD_COMPILE_OPTION -c89) set(CMAKE_C90_STANDARD_COMPILE_OPTION -c89)
set(CMAKE_C90_EXTENSION_COMPILE_OPTION -c89) set(CMAKE_C90_EXTENSION_COMPILE_OPTION -c89)
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION -c99) set(CMAKE_C99_STANDARD_COMPILE_OPTION -c99)
set(CMAKE_C99_EXTENSION_COMPILE_OPTION -c99) set(CMAKE_C99_EXTENSION_COMPILE_OPTION -c99)
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 15.3) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 15.3)
set(CMAKE_C11_STANDARD_COMPILE_OPTION -c11) set(CMAKE_C11_STANDARD_COMPILE_OPTION -c11)
set(CMAKE_C11_EXTENSION_COMPILE_OPTION -c11) set(CMAKE_C11_EXTENSION_COMPILE_OPTION -c11)
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
endif () endif ()
endif () endif ()
......
...@@ -39,10 +39,13 @@ set(CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",") ...@@ -39,10 +39,13 @@ set(CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",")
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.13) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.13)
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89") set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=c89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=c89")
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=c99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=c99")
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=c11")
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
elseif (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.11) elseif (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.11)
set(CMAKE_C90_STANDARD_COMPILE_OPTION "") set(CMAKE_C90_STANDARD_COMPILE_OPTION "")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "")
......
...@@ -9,11 +9,14 @@ string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded") ...@@ -9,11 +9,14 @@ string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded")
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1)
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-qlanglvl=stdc89") set(CMAKE_C90_STANDARD_COMPILE_OPTION "-qlanglvl=stdc89")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-qlanglvl=extc89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-qlanglvl=extc89")
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-qlanglvl=stdc99") set(CMAKE_C99_STANDARD_COMPILE_OPTION "-qlanglvl=stdc99")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-qlanglvl=extc99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-qlanglvl=extc99")
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.1) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.1)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-qlanglvl=extc1x") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-qlanglvl=extc1x")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-qlanglvl=extc1x") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-qlanglvl=extc1x")
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
endif () endif ()
endif() endif()
......
...@@ -4,13 +4,16 @@ __compiler_xlclang(C) ...@@ -4,13 +4,16 @@ __compiler_xlclang(C)
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.1) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.1)
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89") set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89")
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-qlanglvl=extc1x") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-qlanglvl=extc1x")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-qlanglvl=extc1x") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-qlanglvl=extc1x")
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.2) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.2)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
endif () endif ()
endif() endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment