File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
include (${UMF_CMAKE_SOURCE_DIR} /cmake/helpers.cmake )
6
6
7
+ set (UMF_LEVEL_ZERO_INCLUDE_DIR
8
+ ""
9
+ CACHE FILEPATH "Directory containing the Level Zero Headers" )
10
+
7
11
# Compile definitions for UMF library.
8
12
#
9
13
# TODO: Cleanup the compile definitions across all the CMake files
10
14
set (UMF_COMMON_COMPILE_DEFINITIONS UMF_VERSION=${UMF_VERSION} )
11
15
12
- if (UMF_BUILD_LEVEL_ZERO_PROVIDER )
16
+ if (UMF_BUILD_LEVEL_ZERO_PROVIDER AND (UMF_BUILD_GPU_TESTS
17
+ OR (NOT UMF_LEVEL_ZERO_INCLUDE_DIR )))
13
18
include (FetchContent )
14
19
15
20
set (LEVEL_ZERO_LOADER_REPO "https://github.com/oneapi-src/level-zero.git" )
@@ -35,6 +40,10 @@ if(UMF_BUILD_LEVEL_ZERO_PROVIDER)
35
40
${level-zero-loader_SOURCE_DIR}/include
36
41
CACHE PATH "Path to Level Zero Headers" )
37
42
message (STATUS "Level Zero include directory: ${LEVEL_ZERO_INCLUDE_DIRS} " )
43
+ elseif (UMF_BUILD_LEVEL_ZERO_PROVIDER )
44
+ # Only header is needed to build UMF
45
+ set (LEVEL_ZERO_INCLUDE_DIRS ${UMF_LEVEL_ZERO_INCLUDE_DIR} )
46
+ message (STATUS "Level Zero include directory: ${LEVEL_ZERO_INCLUDE_DIRS} " )
38
47
endif ()
39
48
40
49
add_subdirectory (utils )
You can’t perform that action at this time.
0 commit comments