Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ add_custom_target(sycl-headers
sycl-device-aspect-macros-header
boost_mp11-headers)

list(APPEND UR_HEADERS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like UR_HEADERS is originally defined in UR itself here and these three files are UR files, should the fix instead be in UR itself rather than SYCL? This is fine as a temporary fix though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is really not to copy headers to sycl's build directory in the first place, but use target_include_directories(PRIVATE. The whole way we do dependencies isn't proper cmake, and I need to flense the whole thing. This is temporary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could change that variable name, though. Didn't realise it clashed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont know enough about cmake anyway, i thought it was intentionally clashing :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use the delightfully quaint "UR_HEADERS_TO_COPY"

${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h
${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def
${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp
)
add_custom_command(
OUTPUT ${OUT_HEADERS_IN_SYCL_DIR}
${OUT_HEADERS_IN_CL_DIR}
Expand All @@ -252,14 +257,13 @@ add_custom_command(
${HEADERS_IN_CL_DIR}
${HEADERS_IN_STD_DIR}
${HEADERS_IN_SYCLCOMPAT_DIR}
${UR_HEADERS}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/sycl ${SYCL_INCLUDE_BUILD_DIR}/sycl
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${SYCL_INCLUDE_BUILD_DIR}/CL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/std ${SYCL_INCLUDE_BUILD_DIR}/std
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/syclcompat ${SYCL_INCLUDE_BUILD_DIR}/syclcompat
COMMAND ${CMAKE_COMMAND} -E copy ${sycl_inc_dir}/syclcompat.hpp ${SYCL_INCLUDE_BUILD_DIR}/syclcompat.hpp
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h ${SYCL_INCLUDE_BUILD_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def ${SYCL_INCLUDE_BUILD_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp ${SYCL_INCLUDE_BUILD_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${UR_HEADERS} ${SYCL_INCLUDE_BUILD_DIR}
COMMENT "Copying SYCL headers ...")

# Copy SYCL headers from source to install directory
Expand Down
Loading