Skip to content

Commit a01f049

Browse files
Install xmethods as part of sycl-headers
Signed-off-by: Mihails Strasuns <[email protected]>
1 parent d6be8ff commit a01f049

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

sycl/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ endif()
5151
set(CLANG_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}.${CLANG_VERSION_PATCHLEVEL}")
5252

5353
set(LLVM_INST_INC_DIRECTORY "lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include")
54+
set(LLVM_PYTHON_DIRECTORY "lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/python")
5455
set(dst_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
5556

5657
# Find OpenCL headers and libraries installed in the system and use them to
@@ -150,6 +151,12 @@ COMMENT "Copying SYCL headers ...")
150151
# Configure SYCL headers
151152
install(DIRECTORY "${sycl_inc_dir}/." DESTINATION "${LLVM_INST_INC_DIRECTORY}" COMPONENT sycl-headers)
152153

154+
# Auxilliary extras for SYCL headers
155+
add_custom_target(sycl-headers-extras ALL
156+
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/xmethods ${dst_dir}
157+
COMMENT "Copying SYCL header xmethod scripts ...")
158+
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/xmethods" DESTINATION ${LLVM_PYTHON_DIRECTORY} COMPONENT sycl-headers-extras)
159+
153160
set(SYCL_RT_LIBS sycl)
154161
if (MSVC)
155162
list(APPEND SYCL_RT_LIBS sycld)
@@ -244,6 +251,7 @@ set( SYCL_TOOLCHAIN_DEPLOY_COMPONENTS
244251
clang-resource-headers
245252
opencl-headers
246253
sycl-headers
254+
sycl-headers-extras
247255
sycl
248256
pi_opencl
249257
)

sycl/test/accessors.o

147 Bytes
Binary file not shown.

sycl/test/xmethods/accessors-device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %clangxx -fsycl-device-only -c -fno-color-diagnostics -Xclang -ast-dump %s | FileCheck %s
2+
// UNSUPPORTED: windows
23
#include <CL/sycl/accessor.hpp>
34

45
typedef cl::sycl::accessor<int, 1, cl::sycl::access::mode::read> dummy;

sycl/test/xmethods/accessors.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %clangxx -c -fno-color-diagnostics -Xclang -ast-dump %s | FileCheck %s
2+
// UNSUPPORTED: windows
23
#include <CL/sycl/accessor.hpp>
34

45
typedef cl::sycl::accessor<int, 1, cl::sycl::access::mode::read> dummy;

0 commit comments

Comments
 (0)