소스 검색

IntelLLVM: Avoid finding not-yet-supported icpx on Windows

Intel oneAPI 2023.0 added the `icpx` compiler front-end on Windows.
It uses a GNU-like command-line, and is not yet supported by CMake.
Avoid finding `icpx` as the CXX compiler on Windows until support
is added.

Fixes: #24266
Issue: #24314
Michael Hirsch 2 년 전
부모
커밋
8834e4d6a5
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      Modules/CMakeDetermineCXXCompiler.cmake

+ 7 - 1
Modules/CMakeDetermineCXXCompiler.cmake

@@ -58,7 +58,13 @@ else()
 
     # finally list compilers to try
     if(NOT CMAKE_CXX_COMPILER_INIT)
-      set(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC icpx icx clang++)
+      set(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC)
+      if(NOT CMAKE_HOST_WIN32)
+        # FIXME(#24314): Add support for the GNU-like icpx compiler driver
+        # on Windows, first introduced by Intel oneAPI 2023.0.
+        list(APPEND CMAKE_CXX_COMPILER_LIST icpx)
+      endif()
+      list(APPEND CMAKE_CXX_COMPILER_LIST icx clang++)
     endif()
 
     _cmake_find_compiler(CXX)