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