Skip to content

Commit 9878295

Browse files
committed
a
1 parent 0c09d06 commit 9878295

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/workflows/reusable_basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
install_tbb: 'ON'
4949
disable_hwloc: 'OFF'
5050
link_hwloc_statically: 'OFF'
51-
cmake_ver: 'latest'
51+
cmake_ver: '3.29'
5252
- os: 'ubuntu-24.04'
5353
build_type: Debug
5454
compiler: {c: gcc, cxx: g++}

CMakeLists.txt

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,24 @@ if(UMF_BUILD_LEVEL_ZERO_PROVIDER)
412412

413413
message(STATUS "Fetching Level Zero loader (${LEVEL_ZERO_LOADER_TAG}) "
414414
"from ${LEVEL_ZERO_LOADER_REPO} ...")
415-
FetchContent_Declare(
416-
level-zero-loader
417-
GIT_REPOSITORY ${LEVEL_ZERO_LOADER_REPO}
418-
GIT_TAG ${LEVEL_ZERO_LOADER_TAG}
419-
EXCLUDE_FROM_ALL)
420-
# Only populate the repo - we don't need to build it
421-
FetchContent_Populate(level-zero-loader)
415+
416+
# We don't want to build and include Level Zero binaries to our install
417+
# target. For CMake >= 3.28 we could use EXCLUDE_FROM_ALL flag to do
418+
# that, but for older versions we need to use FetchContent_Populate
419+
if(CMAKE_VERSION VERSION_LESS 3.28)
420+
FetchContent_Declare(
421+
level-zero-loader
422+
GIT_REPOSITORY ${LEVEL_ZERO_LOADER_REPO}
423+
GIT_TAG ${LEVEL_ZERO_LOADER_TAG})
424+
FetchContent_Populate(level-zero-loader)
425+
else()
426+
FetchContent_Declare(
427+
level-zero-loader
428+
GIT_REPOSITORY ${LEVEL_ZERO_LOADER_REPO}
429+
GIT_TAG ${LEVEL_ZERO_LOADER_TAG}
430+
EXCLUDE_FROM_ALL)
431+
FetchContent_MakeAvailable(level-zero-loader)
432+
endif()
422433

423434
set(LEVEL_ZERO_INCLUDE_DIRS
424435
${level-zero-loader_SOURCE_DIR}/include

0 commit comments

Comments
 (0)