diff options
author | Josef Angstenberger <code@jtxa.de> | 2020-08-31 23:45:09 (GMT) |
---|---|---|
committer | Josef Angstenberger <code@jtxa.de> | 2020-09-20 22:57:20 (GMT) |
commit | 55fc045aa838ac2f2975df1208a3c7166c37305c (patch) | |
tree | 0eb3d39028ee12fd5e326ff4ba4b193ded5b6f3a /Modules/Compiler | |
parent | 2e69993101a0ee12cc5ce8419934ae40f0490749 (diff) | |
download | CMake-55fc045aa838ac2f2975df1208a3c7166c37305c.zip CMake-55fc045aa838ac2f2975df1208a3c7166c37305c.tar.gz CMake-55fc045aa838ac2f2975df1208a3c7166c37305c.tar.bz2 |
Compiler/TI: Add std options for C11
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/TI-C.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/Compiler/TI-C.cmake b/Modules/Compiler/TI-C.cmake index 3941577..3c97afb 100644 --- a/Modules/Compiler/TI-C.cmake +++ b/Modules/Compiler/TI-C.cmake @@ -6,12 +6,15 @@ __compiler_ti(C) if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") set(__COMPILER_TI_C99_VERSION_ARM 5.2) + set(__COMPILER_TI_C11_VERSION_ARM 18.12) elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430") set(__COMPILER_TI_C99_VERSION_MSP430 4.3) + set(__COMPILER_TI_C11_VERSION_MSP430 18.12) elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "TMS320C28x") set(__COMPILER_TI_C99_VERSION_TMS320C28x 6.3) + set(__COMPILER_TI_C11_VERSION_TMS320C28x 18.9) elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "TMS320C6x") set(__COMPILER_TI_C99_VERSION_TMS320C6x 7.5) @@ -31,6 +34,14 @@ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C99_VERSION_$ set(CMAKE_C99_STANDARD_COMPILE_OPTION "--c99" "--strict_ansi") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "--c99" "--relaxed_ansi") + if(DEFINED __COMPILER_TI_C11_VERSION_${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} AND + CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C11_VERSION_${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}}") + + set(CMAKE_C11_STANDARD_COMPILE_OPTION "--c11" "--strict_ansi") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "--c11" "--relaxed_ansi") + + endif() + else() set(CMAKE_C90_STANDARD_COMPILE_OPTION "--strict_ansi") |