File tree 3 files changed +11
-0
lines changed
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ set(UR_BUILD_XPTI_LIBS OFF)
33
33
set (UR_ENABLE_SYMBOLIZER ON CACHE BOOL "Enable symbolizer for sanitizer layer." )
34
34
set (UR_ENABLE_TRACING ON )
35
35
36
+ set (UR_EXTERNAL_DEPENDENCIES "sycl-headers" CACHE LIST
37
+ "List of external CMake targets for executables/libraries to depend on" FORCE)
38
+
36
39
if ("level_zero" IN_LIST SYCL_ENABLE_BACKENDS)
37
40
set (UR_BUILD_ADAPTER_L0 ON )
38
41
endif ()
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ option(UR_BUILD_XPTI_LIBS "Build the XPTI libraries when tracing is enabled" ON)
48
48
option (UR_STATIC_LOADER "Build loader as a static library" OFF )
49
49
option (UR_FORCE_LIBSTDCXX "Force use of libstdc++ in a build using libc++ on Linux" OFF )
50
50
option (UR_ENABLE_LATENCY_HISTOGRAM "Enable latncy histogram" OFF )
51
+ set (UR_EXTERNAL_DEPENDENCIES "" CACHE LIST
52
+ "List of external CMake targets for executables/libraries to depend on" )
51
53
set (UR_DPCXX "" CACHE FILEPATH "Path of the DPC++ compiler executable" )
52
54
set (UR_DPCXX_BUILD_FLAGS "" CACHE STRING "Build flags to pass to DPC++ when compiling device programs" )
53
55
set (UR_SYCL_LIBRARY_DIR "" CACHE PATH
Original file line number Diff line number Diff line change @@ -191,6 +191,9 @@ function(add_ur_executable name)
191
191
add_ur_target_compile_options(${name} )
192
192
add_ur_target_exec_options(${name} )
193
193
add_ur_target_link_options(${name} )
194
+ if (UR_EXTERNAL_DEPENDENCIES)
195
+ add_dependencies (${name} ${UR_EXTERNAL_DEPENDENCIES} )
196
+ endif ()
194
197
endfunction ()
195
198
196
199
function (add_ur_library name )
@@ -202,6 +205,9 @@ function(add_ur_library name)
202
205
$<$<STREQUAL :$<TARGET_LINKER_FILE_NAME:${name} >,link.exe>:LINKER:/DEPENDENTLOADFLAG:0x2000>
203
206
)
204
207
endif ()
208
+ if (UR_EXTERNAL_DEPENDENCIES)
209
+ add_dependencies (${name} ${UR_EXTERNAL_DEPENDENCIES} )
210
+ endif ()
205
211
endfunction ()
206
212
207
213
function (install_ur_library name )
You can’t perform that action at this time.
0 commit comments