File tree Expand file tree Collapse file tree 3 files changed +8
-11
lines changed
Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -347,17 +347,12 @@ endif()
347347# DpctlExtCAPI: Interface library for dpctl_ext C-API
348348# Provides access to:
349349# 1. Public C-API headers from dpctl_ext/apis/include
350- # 2. Generated Cython headers from a specific build subdirectory
351-
352- # Set the specific directory for generated Cython headers
353- set (DPCTL_EXT_GENERATED_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR} )
350+ # 2. Generated Cython headers via per-target header interface libraries
354351
355352add_library (DpctlExtCAPI INTERFACE )
356353target_include_directories (
357354 DpctlExtCAPI
358- INTERFACE
359- ${CMAKE_CURRENT_SOURCE_DIR} /dpctl_ext/apis/include
360- ${DPCTL_EXT_GENERATED_INCLUDE_DIR}
355+ INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} /dpctl_ext/apis/include
361356)
362357
363358add_subdirectory (dpctl_ext )
Original file line number Diff line number Diff line change @@ -159,9 +159,11 @@ function(build_dpctl_ext _trgt _src _dest)
159159 # TODO: create separate folder inside build folder that contains only
160160 # headers related to this target and appropriate folder structure to
161161 # eliminate shadow dependencies
162- get_filename_component (_generated_src_dir_dir ${_generated_src_dir} DIRECTORY )
162+ # Go up two levels to build root for "dpctl_ext/tensor/_usmarray.h" resolution
163+ get_filename_component (_parent_dir ${_generated_src_dir} DIRECTORY )
164+ get_filename_component (_build_root ${_parent_dir} DIRECTORY )
163165 # TODO: do not set directory if we did not generate header
164- target_include_directories (${_trgt} INTERFACE ${_generated_src_dir_dir } )
166+ target_include_directories (${_trgt} INTERFACE ${_build_root } )
165167 set (_rpath_value "$ORIGIN" )
166168 if (BUILD_DPCTL_EXT_RELATIVE_PATH)
167169 set (_rpath_value "${_rpath_value} /${BUILD_DPCTL_EXT_RELATIVE_PATH} " )
Original file line number Diff line number Diff line change 6666
6767// Include the generated Cython C-API headers for usm_ndarray
6868// These headers are generated during build and placed in the build directory
69- #include < dpctl_ext/tensor/_usmarray.h>
70- #include < dpctl_ext/tensor/_usmarray_api.h>
69+ #include " dpctl_ext/tensor/_usmarray.h"
70+ #include " dpctl_ext/tensor/_usmarray_api.h"
7171
7272/*
7373 * Function to import dpctl_ext C-API and make it available.
You can’t perform that action at this time.
0 commit comments