summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Weisi <android.weisi@googlemail.com>2020-12-01 14:56:21 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-01 17:14:38 (GMT)
commit8eeddb1f0a73e45a4b5c54fd80e486cc706da941 (patch)
tree66c72190f90254f7c7ea6dc44643b29298effb28
parentf264f1d783d57c70a0864768b6b1aa44fc94194a (diff)
downloadCMake-8eeddb1f0a73e45a4b5c54fd80e486cc706da941.zip
CMake-8eeddb1f0a73e45a4b5c54fd80e486cc706da941.tar.gz
CMake-8eeddb1f0a73e45a4b5c54fd80e486cc706da941.tar.bz2
Compiler/TI: Fix C standard flags in C-only project
Use our compiler architecture variable for C rather than CXX.
-rw-r--r--Modules/Compiler/TI-C.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/Compiler/TI-C.cmake b/Modules/Compiler/TI-C.cmake
index 3c97afb..bd88989 100644
--- a/Modules/Compiler/TI-C.cmake
+++ b/Modules/Compiler/TI-C.cmake
@@ -26,7 +26,7 @@ else()
endif()
-if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C99_VERSION_${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}}")
+if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C99_VERSION_${CMAKE_C_COMPILER_ARCHITECTURE_ID}}")
set(CMAKE_C90_STANDARD_COMPILE_OPTION "--c89" "--strict_ansi")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "--c89" "--relaxed_ansi")
@@ -34,8 +34,8 @@ 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}}")
+ if(DEFINED __COMPILER_TI_C11_VERSION_${CMAKE_C_COMPILER_ARCHITECTURE_ID} AND
+ CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C11_VERSION_${CMAKE_C_COMPILER_ARCHITECTURE_ID}}")
set(CMAKE_C11_STANDARD_COMPILE_OPTION "--c11" "--strict_ansi")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "--c11" "--relaxed_ansi")