Skip to content

Commit f9296b6

Browse files
v-klochkovbader
authored andcommitted
[SYCL] Apply /MD and /MDd on Windows only to SYCL and SYCLD targets (#906)
This patch fixes the build errors caused by RuntimeLibrary value inconsistency for LLVM and apps/tests linked with it, e.g. (MT_StaticRelease vs MD_DynamicRelease) in cases when LLVM_USE_CRT_RELEASE is set to MT. In such cases /MD set for sycl lib targets must not affect tests linked with MT version of LLVM. Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent 7becb9d commit f9296b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/source/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ if (MSVC)
127127
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "")
128128
set(CMAKE_CXX_FLAGS_DEBUG "")
129129

130-
target_compile_options(sycl PUBLIC ${SYCL_CXX_FLAGS_RELEASE})
130+
target_compile_options(sycl PRIVATE ${SYCL_CXX_FLAGS_RELEASE})
131131

132132
add_sycl_rt_library(sycld ${SYCL_SOURCES})
133-
target_compile_options(sycld PUBLIC ${SYCL_CXX_FLAGS_DEBUG})
133+
target_compile_options(sycld PRIVATE ${SYCL_CXX_FLAGS_DEBUG})
134134
endif()
135135

136136
install(TARGETS ${SYCL_RT_LIBS}

0 commit comments

Comments
 (0)