- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I installed the oneAPI Base Toolkit 2025.1, and I am using it with CMake on Windows 11.
In the CMake file, I use the IntelSYCLConfig.cmake via:
find_package(IntelSYCL CONFIG REQUIRED)
This currently fails like this:
-- The CXX compiler identification is IntelLLVM 2025.1.0 with MSVC-like command-line
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icx.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2025.1.0 Build 20250317
Copyright (C) 1985-2025 Intel Corporation. All rights reserved.
-- SYCL Compiler version: 20250100
-- SYCL_INCLUDE_DIR: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/include
-- SYCL_LIBRARY=SYCL_LIBRARY-NOTFOUND
CMake Error at C:/Program Files (x86)/Intel/oneAPI/compiler/latest/lib/cmake/IntelSYCL/IntelSYCLConfig.cmake:223 (separate_arguments):
separate_arguments given unexpected argument(s)
Call Stack (most recent call first):
C:/Program Files (x86)/Intel/oneAPI/compiler/latest/lib/cmake/IntelSYCL/IntelSYCLConfig.cmake:380 (SYCL_FEATURE_TEST_BUILD)
CMakeLists.txt:5 (find_package)
CMake Error at C:/Program Files (x86)/Intel/oneAPI/compiler/latest/lib/cmake/IntelSYCL/IntelSYCLConfig.cmake:386 (SYCL_FEATURE_TEST_EXTRACT):
SYCL_FEATURE_TEST_EXTRACT Function invoked with incorrect arguments for
function named: SYCL_FEATURE_TEST_EXTRACT
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
CMake Error at C:/Program Files/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find IntelSYCL (missing: SYCL_LIBRARY)
Reason given by package: SYCL: It appears that the C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icx.exe does not support SYCL
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files (x86)/Intel/oneAPI/compiler/latest/lib/cmake/IntelSYCL/IntelSYCLConfig.cmake:422 (find_package_handle_standard_args)
CMakeLists.txt:5 (find_package)
CMake Error at CMakeLists.txt:5 (find_package):
Found package configuration file:
C:/Program Files (x86)/Intel/oneAPI/compiler/latest/lib/cmake/IntelSYCL/IntelSYCLConfig.cmake
but it set IntelSYCL_FOUND to FALSE so package "IntelSYCL" is considered to
be NOT FOUND. Reason given by package:
SYCL: It appears that the C:/Program Files
(x86)/Intel/oneAPI/compiler/latest/bin/icx.exe does not support SYCL
-- Configuring incomplete, errors occurred!
PS E:\cpp\sycl_test>
I debugged this to C:\Program Files (x86)\Intel\oneAPI\compiler\latest\lib\cmake\IntelSYCL\IntelSYCLConfig.cmake:332
Lines 330-333 look like this:
#TODO by default use sycl7 for windows
if(WIN32)
set(sycl_lib_suffix "7")
else()
The problem is that it is looking for sycl7. However, for me, I can only find sycl.lib or sycl8.lib:
> ls 'C:/Program Files (x86)/Intel/oneAPI/compiler/latest/lib/sycl*'
Directory: C:\Program Files (x86)\Intel\oneAPI\compiler\latest\lib
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 17.03.2025 20:45 3352918 sycl-devicelib-host.lib
-a--- 17.03.2025 20:45 3352942 sycl-devicelib-host.new.lib
-a--- 17.03.2025 20:45 2032372 sycl-preview.lib
-a--- 17.03.2025 20:45 2036640 sycl-previewd.lib
-a--- 17.03.2025 20:45 2016022 sycl.lib
-a--- 17.03.2025 20:45 2032372 sycl8-preview.lib
-a--- 17.03.2025 20:45 2036640 sycl8-previewd.lib
-a--- 17.03.2025 20:45 2016022 sycl8.lib
-a--- 17.03.2025 20:45 2020306 sycl8d.lib
-a--- 17.03.2025 20:45 2020306 sycld.lib
Either remove the default sycl_lib_suffix completely, or also look for version 8 and other future versions. So you don't need to constantly update IntelSYCLConfig.cmake.
Locally, I fixed this by doing the following before the find_package call:
set(SYCL_LIB_SUFFIX "8")
Another problem is that on line 362 you are appending another SYCL_FLAG to a list:
# TODO verify if this is needed
# Windows: Add Exception handling
if(WIN32)
list(APPEND SYCL_FLAGS "/EHsc")
endif()
This later breaks the separate_arguments on line 223.
You need to convert the list to a command line before line 223. I fixed this locally by inserting the following before line 223:
string(REPLACE ";" " " SYCL_CXX_FLAGS_LIST "${SYCL_CXX_FLAGS_LIST}")
I have attached the partially fixed IntelSYCLConfig.cmake
But I don't know if that is the best way to do this
Best regards,
Clemens
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a known issue when compiling SYCL code on Windows using CMake with the latest 2025.1 version of the compiler which can cause errors like
CMake Error at C:/Program Files/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find IntelSYCL (missing: SYCL_LIBRARY)
Reason given by package: SYCL: It appears that the C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icx.exe does not support SYCL
Workaround: C:\Program Files (x86)\Intel\oneAPI\compiler\latest\lib\cmake\IntelSYCL\IntelSYCLConfig.cmake file needs to be updated with the following two changes:
- Line 332: Update set(sycl_lib_suffix "7") with set(sycl_lib_suffix "8")
- Line 365: Replace set(SYCL_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SYCL_FLAGS}") with
list(JOIN SYCL_FLAGS " " SYCL_FLAGS_STRING)
message(DEBUG "SYCL_FLAGS_STRING: ${SYCL_FLAGS_STRING}")
set(SYCL_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SYCL_FLAGS_STRING}")
A fix for this issue will be available in an upcoming compiler release.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page