Skip to content

Commit 66719aa

Browse files
committed
a
1 parent 0c09d06 commit 66719aa

File tree

3 files changed

+38
-22
lines changed

3 files changed

+38
-22
lines changed

.github/workflows/reusable_basic.yml

Lines changed: 2 additions & 2 deletions
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.0'
5252
- os: 'ubuntu-24.04'
5353
build_type: Debug
5454
compiler: {c: gcc, cxx: g++}
@@ -137,7 +137,7 @@ jobs:
137137
sudo apt-get update
138138
sudo apt-get install -y clang libnuma-dev lcov
139139
140-
- name: Install cmake (minimum supported version)
140+
- name: Install cmake (non-default version)
141141
if: matrix.cmake_ver != 'latest'
142142
run: |
143143
sudo apt-get remove --purge -y cmake

.github/workflows/reusable_checks.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ jobs:
6464
- name: Run codespell
6565
run: python3 ./.github/scripts/run-codespell.py
6666

67-
- name: Check spelling in docs
68-
run: |
69-
cmake -B build
70-
cmake --build build --target docs
71-
sphinx-build -b spelling ./build/docs_build/config ./build/docs_build/spelling_log -W
72-
7367
# Run Bandit recursively, but omit _deps directory (with 3rd party code) and python's venv
7468
- name: Run Bandit
7569
run: python3 -m bandit -r . -x '/_deps/,/.venv/'

CMakeLists.txt

Lines changed: 36 additions & 14 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
@@ -457,13 +468,24 @@ if(UMF_BUILD_CUDA_PROVIDER)
457468

458469
message(
459470
STATUS "Fetching CUDA (${CUDA_TAG}) headers from ${CUDA_REPO} ...")
460-
FetchContent_Declare(
461-
cuda-headers
462-
GIT_REPOSITORY ${CUDA_REPO}
463-
GIT_TAG ${CUDA_TAG}
464-
EXCLUDE_FROM_ALL)
465-
# Only populate the repo - we don't need to build it
466-
FetchContent_Populate(cuda-headers)
471+
472+
# We don't want to build and include Level Zero binaries to our install
473+
# target. For CMake >= 3.28 we could use EXCLUDE_FROM_ALL flag to do
474+
# that, but for older versions we need to use FetchContent_Populate
475+
if(CMAKE_VERSION VERSION_LESS 3.28)
476+
FetchContent_Declare(
477+
cuda-headers
478+
GIT_REPOSITORY ${CUDA_REPO}
479+
GIT_TAG ${CUDA_TAG})
480+
FetchContent_Populate(cuda-headers)
481+
else()
482+
FetchContent_Declare(
483+
cuda-headers
484+
GIT_REPOSITORY ${CUDA_REPO}
485+
GIT_TAG ${CUDA_TAG}
486+
EXCLUDE_FROM_ALL)
487+
FetchContent_MakeAvailable(cuda-headers)
488+
endif()
467489

468490
set(CUDA_INCLUDE_DIRS
469491
${cuda-headers_SOURCE_DIR}

0 commit comments

Comments
 (0)