summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCXXCompiler.cmake
diff options
context:
space:
mode:
authorMichael Hirsch <scivision@users.noreply.gitlab.kitware.com>2022-12-22 12:02:41 -0500
committerBrad King <brad.king@kitware.com>2023-01-12 10:23:38 -0500
commit8834e4d6a51b4c05ea51099f3865bafe7839f845 (patch)
treeb8d42bbb763569fc7f59404d4c2a06f893cfc7b9 /Modules/CMakeDetermineCXXCompiler.cmake
parent2ac207f04610e196df00b540f8cafbfdffcd4db8 (diff)
downloadcmake-8834e4d6a51b4c05ea51099f3865bafe7839f845.tar.gz
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
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index fd3d028be2..c4ddf75e3f 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/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)