File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ set(CMAKE_INSTALL_RPATH "$ORIGIN")
105
105
106
106
function (build_dpctl_ext _trgt _src _dest)
107
107
set (options SYCL)
108
- cmake_parse_arguments (BUILD_DPCTL_EXT "${options} " "" "" ${ARGN} )
108
+ cmake_parse_arguments (BUILD_DPCTL_EXT "${options} " "RELATIVE_PATH " "" ${ARGN} )
109
109
add_cython_target(${_trgt} ${_src} CXX OUTPUT_VAR _generated_src)
110
110
set (_cythonize_trgt "${_trgt} _cythonize_pyx" )
111
111
Python_add_library(${_trgt} MODULE WITH_SOABI ${_generated_src} )
@@ -147,11 +147,11 @@ function(build_dpctl_ext _trgt _src _dest)
147
147
# TODO: do not set directory if we did not generate header
148
148
target_include_directories (${_trgt} INTERFACE ${_generated_src_dir_dir} )
149
149
set (_rpath_value "$ORIGIN" )
150
+ if (BUILD_DPCTL_EXT_RELATIVE_PATH)
151
+ set (_rpath_value "${_rpath_value} /${BUILD_DPCTL_EXT_RELATIVE_PATH} " )
152
+ endif ()
150
153
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} /../../.." )
155
155
endif ()
156
156
set_target_properties (${_trgt} PROPERTIES INSTALL_RPATH ${_rpath_value} )
157
157
Original file line number Diff line number Diff line change 1
1
2
2
set (_cy_file ${CMAKE_CURRENT_SOURCE_DIR} /_memory.pyx)
3
3
get_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 ".." )
5
5
# _memory include _opaque_smart_ptr.hpp
6
6
target_include_directories (${_trgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
7
7
target_link_libraries (DpctlCAPI INTERFACE ${_trgt} _headers)
Original file line number Diff line number Diff line change 2
2
file (GLOB _cython_sources *.pyx)
3
3
foreach (_cy_file ${_cython_sources} )
4
4
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 ".." )
6
6
target_link_libraries (DpctlCAPI INTERFACE ${_trgt} _headers)
7
7
endforeach ()
Original file line number Diff line number Diff line change 1
1
file (GLOB _cython_sources *.pyx)
2
2
foreach (_cy_file ${_cython_sources} )
3
3
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 ".." )
5
5
target_include_directories (${_trgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /include )
6
6
target_link_libraries (DpctlCAPI INTERFACE ${_trgt} _headers)
7
7
endforeach ()
Original file line number Diff line number Diff line change 2
2
file (GLOB _cython_sources *.pyx)
3
3
foreach (_cy_file ${_cython_sources} )
4
4
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 ".." )
6
6
endforeach ()
7
7
8
8
set (_pybind11_targets)
You can’t perform that action at this time.
0 commit comments