File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ set(CMAKE_INSTALL_RPATH "$ORIGIN")
105105
106106function (build_dpctl_ext _trgt _src _dest )
107107 set (options SYCL)
108- cmake_parse_arguments (BUILD_DPCTL_EXT "${options} " "" "" ${ARGN} )
108+ cmake_parse_arguments (BUILD_DPCTL_EXT "${options} " "RELATIVE_PATH " "" ${ARGN} )
109109 add_cython_target (${_trgt} ${_src} CXX OUTPUT_VAR _generated_src )
110110 set (_cythonize_trgt "${_trgt} _cythonize_pyx" )
111111 Python_add_library (${_trgt} MODULE WITH_SOABI ${_generated_src} )
@@ -147,11 +147,11 @@ function(build_dpctl_ext _trgt _src _dest)
147147 # TODO: do not set directory if we did not generate header
148148 target_include_directories (${_trgt} INTERFACE ${_generated_src_dir_dir} )
149149 set (_rpath_value "$ORIGIN" )
150+ if (BUILD_DPCTL_EXT_RELATIVE_PATH)
151+ set (_rpath_value "${_rpath_value} /${BUILD_DPCTL_EXT_RELATIVE_PATH} " )
152+ endif ()
150153 if (DPCTL_WITH_REDIST)
151- get_filename_component (_src_dir ${_src} DIRECTORY )
152- cmake_path (RELATIVE_PATH CMAKE_SOURCE_DIR BASE_DIRECTORY ${_src_dir} OUTPUT_VARIABLE _relative_path )
153- string (JOIN ":" _expanded_rpath_value ${_rpath_value} "$ORIGIN/${_relative_path} /../../" )
154- set (_rpath_value ${_expanded_rpath_value} )
154+ set (_rpath_value "${_rpath_value} :${_rpath_value} /../../.." )
155155 endif ()
156156 set_target_properties (${_trgt} PROPERTIES INSTALL_RPATH ${_rpath_value} )
157157
Original file line number Diff line number Diff line change 11
22set (_cy_file ${CMAKE_CURRENT_SOURCE_DIR} /_memory.pyx)
33get_filename_component (_trgt ${_cy_file} NAME_WLE )
4- build_dpctl_ext (${_trgt} ${_cy_file} "dpctl/memory" SYCL )
4+ build_dpctl_ext (${_trgt} ${_cy_file} "dpctl/memory" SYCL RELATIVE_PATH ".." )
55# _memory include _opaque_smart_ptr.hpp
66target_include_directories (${_trgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
77target_link_libraries (DpctlCAPI INTERFACE ${_trgt} _headers )
Original file line number Diff line number Diff line change 22file (GLOB _cython_sources *.pyx )
33foreach (_cy_file ${_cython_sources} )
44 get_filename_component (_trgt ${_cy_file} NAME_WLE )
5- build_dpctl_ext (${_trgt} ${_cy_file} "dpctl/program" )
5+ build_dpctl_ext (${_trgt} ${_cy_file} "dpctl/program" RELATIVE_PATH ".." )
66 target_link_libraries (DpctlCAPI INTERFACE ${_trgt} _headers )
77endforeach ()
Original file line number Diff line number Diff line change 11file (GLOB _cython_sources *.pyx )
22foreach (_cy_file ${_cython_sources} )
33 get_filename_component (_trgt ${_cy_file} NAME_WLE )
4- build_dpctl_ext (${_trgt} ${_cy_file} "dpctl/tensor" )
4+ build_dpctl_ext (${_trgt} ${_cy_file} "dpctl/tensor" RELATIVE_PATH ".." )
55 target_include_directories (${_trgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /include )
66 target_link_libraries (DpctlCAPI INTERFACE ${_trgt} _headers )
77endforeach ()
Original file line number Diff line number Diff line change 22file (GLOB _cython_sources *.pyx )
33foreach (_cy_file ${_cython_sources} )
44 get_filename_component (_trgt ${_cy_file} NAME_WLE )
5- build_dpctl_ext (${_trgt} ${_cy_file} "dpctl/utils" )
5+ build_dpctl_ext (${_trgt} ${_cy_file} "dpctl/utils" RELATIVE_PATH ".." )
66endforeach ()
77
88set (_pybind11_targets)
You can’t perform that action at this time.
0 commit comments