瀏覽代碼

HIP: Limit compiler id candidates to those supporting HIP

Currently we only support using Clang for HIP.

Issue: #25143
Brad King 2 年之前
父節點
當前提交
ec1e372953
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Modules/CMakeCompilerIdDetection.cmake

+ 4 - 0
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")