summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCompilerIdDetection.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-08-10 18:26:19 (GMT)
committerBrad King <brad.king@kitware.com>2023-08-10 20:30:41 (GMT)
commitec1e3729530339015ff6b1e0a0cc09b0786d19d3 (patch)
tree8560c0eb7066cb40c19c861f8f3acb4213d3badf /Modules/CMakeCompilerIdDetection.cmake
parent1368e219d95c471cfc5456172afaca22e5c24c7c (diff)
downloadCMake-ec1e3729530339015ff6b1e0a0cc09b0786d19d3.zip
CMake-ec1e3729530339015ff6b1e0a0cc09b0786d19d3.tar.gz
CMake-ec1e3729530339015ff6b1e0a0cc09b0786d19d3.tar.bz2
HIP: Limit compiler id candidates to those supporting HIP
Currently we only support using Clang for HIP. Issue: #25143
Diffstat (limited to 'Modules/CMakeCompilerIdDetection.cmake')
-rw-r--r--Modules/CMakeCompilerIdDetection.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake
index 75d33e8..5fec06f 100644
--- a/Modules/CMakeCompilerIdDetection.cmake
+++ b/Modules/CMakeCompilerIdDetection.cmake
@@ -102,6 +102,10 @@ function(compiler_id_detection outvar lang)
set(ordered_compilers NVIDIA Clang)
endif()
+ if("x${lang}" STREQUAL "xHIP")
+ set(ordered_compilers Clang)
+ endif()
+
if(CID_ID_DEFINE)
foreach(Id ${ordered_compilers})
string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "# define ${CID_PREFIX}COMPILER_IS_${Id} 0\n")