diff options
author | Xavier Hallade <xavier.hallade@intel.com> | 2022-10-06 21:49:53 +0300 |
---|---|---|
committer | Xavier Hallade <xavier.hallade@intel.com> | 2022-10-07 17:14:50 +0300 |
commit | 3714d3c3ce8a64a027012653ee8372617f0ce3f8 (patch) | |
tree | 7f1e5daef070a7b7745ee12dd1a69ca6322dd0e9 /intern/cycles/device | |
parent | 331f8500569df9b3b2aa776c5bcaad7b99c57295 (diff) |
Cycles: link oneAPI backend with debug version of sycl when in Debug
It fixes SYCL runtime issues in Debug builds that were due to mixing
Release and Debug MSVC runtimes.
This commit also removes specific handling of dpcpp compiler executable
to simplify the CMake implementation. Using it like clang++ works and
clang++ executable is also available from Intel oneAPI DPC++ compiler in
case it doesn't.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r-- | intern/cycles/device/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/device/CMakeLists.txt b/intern/cycles/device/CMakeLists.txt index e5467121497..5516e97f34f 100644 --- a/intern/cycles/device/CMakeLists.txt +++ b/intern/cycles/device/CMakeLists.txt @@ -193,8 +193,11 @@ if (WITH_CYCLES_DEVICE_ONEAPI) set(cycles_kernel_oneapi_lib ${CMAKE_CURRENT_BINARY_DIR}/../kernel/libcycles_kernel_oneapi.so) endif() list(APPEND LIB - ${SYCL_LIBRARY} ${cycles_kernel_oneapi_lib} + "$<$<CONFIG:Debug>:${SYCL_LIBRARY_DEBUG}>" + "$<$<CONFIG:Release>:${SYCL_LIBRARY}>" + "$<$<CONFIG:RelWithDebInfo>:${SYCL_LIBRARY}>" + "$<$<CONFIG:MinSizeRel>:${SYCL_LIBRARY}>" ) add_definitions(-DWITH_ONEAPI) list(APPEND SRC |