summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCCompiler.cmake
diff options
context:
space:
mode:
authorAlan Phipps <a-phipps@ti.com>2023-12-06 18:53:02 (GMT)
committerBrad King <brad.king@kitware.com>2024-02-09 20:54:40 (GMT)
commit9ba0a54554c15fe28ea0612c6e166ad114c87cda (patch)
treede9acfaf9bc733eace186169e7b97936ff24f2a0 /Modules/CMakeDetermineCCompiler.cmake
parentc673511263822c688fa302120a29e1e0cf812c0b (diff)
downloadCMake-9ba0a54554c15fe28ea0612c6e166ad114c87cda.zip
CMake-9ba0a54554c15fe28ea0612c6e166ad114c87cda.tar.gz
CMake-9ba0a54554c15fe28ea0612c6e166ad114c87cda.tar.bz2
TIClang: Add support for TI Clang-based compilers, including tiarmclang
Add TIClang compiler ID and support in compiler modules. Update documentation. Add rudimentary RunCMake test for TIClang to test basic functionality. Fixes: #24619
Diffstat (limited to 'Modules/CMakeDetermineCCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 8beebc5..73b6cee 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -166,6 +166,11 @@ if (NOT _CMAKE_TOOLCHAIN_PREFIX)
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
set(_CMAKE_TOOLCHAIN_SUFFIX ${CMAKE_MATCH_4})
set(_CMAKE_COMPILER_SUFFIX ${CMAKE_MATCH_6})
+ elseif(CMAKE_C_COMPILER_ID MATCHES "TIClang")
+ if (COMPILER_BASENAME MATCHES "^(.+)?clang(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX "${CMAKE_MATCH_1}")
+ set(_CMAKE_TOOLCHAIN_SUFFIX "${CMAKE_MATCH_2}")
+ endif()
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(CMAKE_C_COMPILER_TARGET)
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_C_COMPILER_TARGET}-)