Skip to content

Commit 6ed84e4

Browse files
stefanatworkCopilot
andcommitted
Fix dpcpp.cmake to recognise icx-cl as the ICX compiler on Windows
The SYCL_ONEAPI_ICX detection checked for 'icx' and 'icpx' but not for 'icx-cl', the MSVC-compatibility-mode variant of the ICX compiler used when building with Ninja/CMake on Windows. Without this match the cmake logic fell through to the Linux/Clang flag path, injecting flags such as -std=c++17, -fvisibility=hidden and -ffp-model=precise that icx-cl rejects with -Werror,-Wunknown-argument errors. Add 'icx-cl' to the SYCL_ONEAPI_ICX name check so the correct Windows ICX flag set is selected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 56af6a2 commit 6ed84e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/cmake/dpcpp.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GET_FILENAME_COMPONENT(SYCL_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
2424
GET_FILENAME_COMPONENT(SYCL_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
2525
IF (NOT SYCL_COMPILER_NAME STREQUAL "clang++")
2626
SET(SYCL_ONEAPI TRUE)
27-
IF (SYCL_COMPILER_NAME STREQUAL "icx" OR SYCL_COMPILER_NAME STREQUAL "icpx")
27+
IF (SYCL_COMPILER_NAME STREQUAL "icx" OR SYCL_COMPILER_NAME STREQUAL "icpx" OR SYCL_COMPILER_NAME STREQUAL "icx-cl")
2828
SET(SYCL_ONEAPI_ICX TRUE)
2929
ELSE()
3030
SET(SYCL_ONEAPI_ICX FALSE)

0 commit comments

Comments
 (0)