Skip to content
Open
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
13 changes: 12 additions & 1 deletion sycl/test-e2e/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,21 @@ execute_process(
)

if(CMPLR_RESULT EQUAL 0 AND CMPLR_VER)
string(REGEX MATCH "DPC\\+\\+ compiler ([0-9]+)" _ ${CMPLR_VER})
# CMAKE_CXX_COMPILER_ID will only be set in standalone mode, otherwise
# the compiler must be the just-built clang.
if(SYCL_TEST_E2E_STANDALONE AND CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
set(CMPLR_REGEX "Intel\\(R\\) oneAPI DPC\\+\\+/C\\+\\++ Compiler ([0-9]+)")
else()
set(CMPLR_REGEX "DPC\\+\\+ compiler ([0-9]+)")
endif()
string(REGEX MATCH ${CMPLR_REGEX} _ ${CMPLR_VER})
set(DPCPP_VERSION_MAJOR "${CMAKE_MATCH_1}")
endif()

if("${DPCPP_VERSION_MAJOR}" STREQUAL "")
message(FATAL_ERROR "Could not detect SYCL compiler version")
endif()

if(SYCL_TEST_E2E_STANDALONE)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in"
"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py")
Expand Down
Loading