Skip to content

Commit b3ef39e

Browse files
committed
[SYCL][E2E] Search for L0 SDK in standalone mode
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent acf5c9f commit b3ef39e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

sycl/test-e2e/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ if(SYCL_TEST_E2E_STANDALONE)
1414
if( NOT OpenCL_LIBRARY )
1515
find_package(OpenCL)
1616
endif()
17+
if(NOT DEFINED LEVEL_ZERO_INCLUDE)
18+
find_path(LEVEL_ZERO_PATH level_zero/ze_api.h PATH_SUFFIXES include)
19+
if(LEVEL_ZERO_PATH)
20+
set(LEVEL_ZERO_INCLUDE "${LEVEL_ZERO_PATH}")
21+
endif()
22+
endif()
23+
if(NOT DEFINED LEVEL_ZERO_LIBS_DIR)
24+
find_library(LEVEL_ZERO_LIBS_PATH ze_loader)
25+
if(LEVEL_ZERO_LIBS_PATH)
26+
# We have the path of the lib, get the containing directory
27+
# so we can include it.
28+
cmake_path(GET LEVEL_ZERO_LIBS_PATH PARENT_PATH LEVEL_ZERO_LIBS_PATH)
29+
set(LEVEL_ZERO_LIBS_DIR "${LEVEL_ZERO_LIBS_PATH}")
30+
endif()
31+
endif()
1732
else()
1833
if( NOT OpenCL_LIBRARY )
1934
set(OpenCL_LIBRARY "${LLVM_BINARY_DIR}/lib")

0 commit comments

Comments
 (0)