Skip to content

Commit 1c01bac

Browse files
committed
W/a to resolve an issue when compiler CMake can't find SYCL_LIBRARY
1 parent e53f076 commit 1c01bac

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,16 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
6060
# 8. Paths stored in the CMake System Package Registry
6161
# 9. Paths specified by the PATHS option (assumed hard-coded guesses)
6262
set(path_to_cmake_dir ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules)
63-
find_package(IntelSYCL REQUIRED PATHS ${path_to_cmake_dir})
63+
# TODO: use the commented logic once the compiler resolves CMake issue
64+
# find_package(IntelSYCL REQUIRED PATHS ${path_to_cmake_dir})
65+
find_package(IntelSYCL QUIET)
66+
if(SYCL_LIBRARY_FOUND)
67+
find_package(IntelSYCL REQUIRED)
68+
else()
69+
# compiler CMake might have an issue and can't find SYCL_LIBRARY properly
70+
# then use vendored CMake with fixed logic
71+
find_package(IntelSYCL REQUIRED PATHS ${path_to_cmake_dir} NO_DEFAULT_PATH)
72+
endif()
6473
find_package(TBB REQUIRED PATHS ${path_to_cmake_dir})
6574

6675
set(MKL_ARCH "intel64")

dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ if(SYCL_COMPILER)
329329
)
330330
#TODO Make an input file to configure and update the lib current version
331331
if(WIN32)
332-
set(sycl_lib_suffix "8")
332+
set(sycl_lib_suffix "9")
333333
else()
334334
set(sycl_lib_suffix "")
335335
endif()

0 commit comments

Comments
 (0)