File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME)
2424
2525 # Common compilation step setup
2626
27+ target_compile_definitions (
28+ ${LIB_OBJ_NAME}
29+ PRIVATE
30+ __SYCL_INTERNAL_API
31+ SYCL2020_DISABLE_DEPRECATION_WARNINGS
32+ $<$<BOOL :${MSVC} >:__SYCL_BUILD_SYCL_DLL>
33+ )
34+
2735 target_include_directories (
2836 ${LIB_OBJ_NAME}
2937 PRIVATE
@@ -123,10 +131,7 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME)
123131 target_link_options (${LIB_NAME} PRIVATE "LINKER:/DEPENDENTLOADFLAG:0x2000" "LINKER:/MANIFEST:NO" "LINKER:/MANIFEST:EMBED" "LINKER:/MANIFESTINPUT:${CMAKE_CURRENT_SOURCE_DIR} /${MANIFEST_FILE_NAME} " )
124132 endif ()
125133
126- target_compile_definitions (${LIB_OBJ_NAME} PRIVATE __SYCL_INTERNAL_API )
127-
128134 if (WIN32 )
129- target_compile_definitions (${LIB_OBJ_NAME} PRIVATE __SYCL_BUILD_SYCL_DLL )
130135 target_link_libraries (${LIB_NAME} PRIVATE shlwapi)
131136 if (ARG_IMPLIB_NAME)
132137 add_custom_command (
@@ -163,8 +168,6 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME)
163168 endif ()
164169 endif ()
165170
166- target_compile_definitions (${LIB_OBJ_NAME} PRIVATE SYCL2020_DISABLE_DEPRECATION_WARNINGS)
167-
168171 if (SYCL_ENABLE_EXTENSION_JIT)
169172 if (NOT DEFINED LLVM_EXTERNAL_SYCL_JIT_SOURCE_DIR)
170173 message (FATAL_ERROR "Undefined LLVM_EXTERNAL_SYCL_JIT_SOURCE_DIR variable: Must be set when extension to JIT SYCL kernels is enabled" )
You can’t perform that action at this time.
0 commit comments