File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 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)
3333set (UR_ENABLE_SYMBOLIZER ON CACHE BOOL "Enable symbolizer for sanitizer layer." )
3434set (UR_ENABLE_TRACING ON )
3535
36+ set (UR_EXTERNAL_DEPENDENCIES "sycl-headers" CACHE LIST
37+ "List of external CMake targets for executables/libraries to depend on" FORCE)
38+
3639if ("level_zero" IN_LIST SYCL_ENABLE_BACKENDS)
3740 set (UR_BUILD_ADAPTER_L0 ON )
3841endif ()
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)
4848option (UR_STATIC_LOADER "Build loader as a static library" OFF )
4949option (UR_FORCE_LIBSTDCXX "Force use of libstdc++ in a build using libc++ on Linux" OFF )
5050option (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" )
5153set (UR_DPCXX "" CACHE FILEPATH "Path of the DPC++ compiler executable" )
5254set (UR_DPCXX_BUILD_FLAGS "" CACHE STRING "Build flags to pass to DPC++ when compiling device programs" )
5355set (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)
191191 add_ur_target_compile_options(${name} )
192192 add_ur_target_exec_options(${name} )
193193 add_ur_target_link_options(${name} )
194+ if (UR_EXTERNAL_DEPENDENCIES)
195+ add_dependencies (${name} ${UR_EXTERNAL_DEPENDENCIES} )
196+ endif ()
194197endfunction ()
195198
196199function (add_ur_library name )
@@ -202,6 +205,9 @@ function(add_ur_library name)
202205 $<$<STREQUAL :$<TARGET_LINKER_FILE_NAME:${name} >,link.exe>:LINKER:/DEPENDENTLOADFLAG:0x2000>
203206 )
204207 endif ()
208+ if (UR_EXTERNAL_DEPENDENCIES)
209+ add_dependencies (${name} ${UR_EXTERNAL_DEPENDENCIES} )
210+ endif ()
205211endfunction ()
206212
207213function (install_ur_library name )
You can’t perform that action at this time.
0 commit comments