Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 6 additions & 3 deletions cmake/IntelSYCLConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ set_property(TARGET IntelSYCL::SYCL_CXX PROPERTY
set_property(TARGET IntelSYCL::SYCL_CXX PROPERTY
INTERFACE_LINK_OPTIONS ${SYCL_LINK_FLAGS})
set_property(TARGET IntelSYCL::SYCL_CXX PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${SYCL_INCLUDE_DIR})
INTERFACE_INCLUDE_DIRECTORIES $<BUILD_INTERFACE:${SYCL_INCLUDE_DIR}>)
set_property(TARGET IntelSYCL::SYCL_CXX PROPERTY
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES ${SYCL_INCLUDE_DIR})
set_property(TARGET IntelSYCL::SYCL_CXX PROPERTY
INTERFACE_LINK_DIRECTORIES ${SYCL_LIBRARY_DIR})

Expand Down Expand Up @@ -343,12 +345,13 @@ Adding sycl to all sources but that may effect compilation times")
if(NOT SYCL_SOURCES)
message(WARNING "add_sycl_to_target() does not have sources specified.. Adding sycl to all sources but that may effect compilation times")
target_compile_options(${SYCL_TARGET} PUBLIC ${__sycl_cxx_options})
target_include_directories(${SYCL_TARGET} PUBLIC ${__sycl_cxx_include_directories})
target_include_directories(${SYCL_TARGET} SYSTEM PUBLIC ${__sycl_cxx_include_directories})
else()
target_include_directories(${SYCL_TARGET} SYSTEM PRIVATE ${__sycl_cxx_include_directories})
endif()

foreach(source ${SYCL_SOURCES})
set_source_files_properties(${source} PROPERTIES COMPILE_OPTIONS "${__sycl_cxx_options}")
set_source_files_properties(${source} PROPERTIES INCLUDE_DIRECTORIES "${__sycl_cxx_include_directories}")
endforeach()

get_target_property(__sycl_link_options
Expand Down
7 changes: 4 additions & 3 deletions libsyclinterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,14 @@ if(DPCTL_GENERATE_COVERAGE)
endif()

target_include_directories(DPCTLSyclInterface
# PUBLIC
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include/syclinterface
${CMAKE_CURRENT_SOURCE_DIR}/include/syclinterface/Support
${CMAKE_CURRENT_SOURCE_DIR}/include/syclinterface/Config
# PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/helper/include/
)
target_include_directories(DPCTLSyclInterface
SYSTEM PRIVATE
${SYCL_INCLUDE_DIR}
)

Expand Down Expand Up @@ -354,7 +355,7 @@ endif()

if(DPCTL_ENABLE_L0_PROGRAM_CREATION)
target_include_directories(DPCTLSyclInterface
PRIVATE
SYSTEM PRIVATE
${LEVEL_ZERO_INCLUDE_DIR}
)
endif()
Expand Down
3 changes: 3 additions & 0 deletions libsyclinterface/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ target_include_directories(dpctl_c_api_tests
PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../helper/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../include/syclinterface"
)
target_include_directories(dpctl_c_api_tests
SYSTEM PRIVATE
${LEVEL_ZERO_INCLUDE_DIR}
)

Expand Down
Loading