Skip to content

Commit 7700edb

Browse files
Pavel Samolysovtcreech-intel
Pavel Samolysov
andauthored
[SYCL] Use incude/sycl/CL as the target to check copied headers (#5050)
When the sycl-headers target calls the copy_directory command, the command sees that the ${OUT_HEADERS_IN_CL_DIR} output already exists and the files are already there. Before the patch, the command looked for the include/CL directory, not include/sycl/CL one, there was no such directory and the headers were copied again and again. Now when we ask CMake to build the sycl-headers target twice, the 'Copying SYCL headers ...' message is displayed only after the first time. Co-authored-by: tcreech-intel <timothy.m.creech@intel.com>
1 parent f5d08c5 commit 7700edb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ file(GLOB_RECURSE HEADERS_IN_SYCL_DIR CONFIGURE_DEPENDS "${sycl_inc_dir}/sycl/*"
126126
file(GLOB_RECURSE HEADERS_IN_CL_DIR CONFIGURE_DEPENDS "${sycl_inc_dir}/CL/*")
127127
string(REPLACE "${sycl_inc_dir}" "${SYCL_INCLUDE_BUILD_DIR}"
128128
OUT_HEADERS_IN_SYCL_DIR "${HEADERS_IN_SYCL_DIR}")
129-
string(REPLACE "${sycl_inc_dir}" "${SYCL_INCLUDE_BUILD_DIR}"
129+
string(REPLACE "${sycl_inc_dir}/CL" "${SYCL_INCLUDE_BUILD_DIR}/sycl/CL"
130130
OUT_HEADERS_IN_CL_DIR "${HEADERS_IN_CL_DIR}")
131131

132132
# Copy SYCL headers from sources to build directory

0 commit comments

Comments
 (0)