@@ -119,6 +119,13 @@ set_property(CACHE UMF_PROXY_LIB_BASED_ON_POOL
119119 PROPERTY STRINGS ${KNOWN_PROXY_LIB_POOLS} )
120120list (APPEND UMF_OPTIONS_LIST UMF_PROXY_LIB_BASED_ON_POOL)
121121
122+ if (UMF_DISABLE_HWLOC)
123+ message (
124+ WARNING
125+ "UMF_DISABLE_HWLOC option is now deprecated and will be removed in v0.12.0 UMF release!"
126+ )
127+ endif ()
128+
122129# --------------------------------------------------------------------------- #
123130# Setup required variables, definitions; fetch dependencies; include
124131# sub_directories based on build options; set flags; etc.
@@ -412,13 +419,24 @@ if(UMF_BUILD_LEVEL_ZERO_PROVIDER)
412419
413420 message (STATUS "Fetching Level Zero loader (${LEVEL_ZERO_LOADER_TAG} ) "
414421 "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)
422+
423+ # We don't want to build and include Level Zero binaries to our install
424+ # target. For CMake >= 3.28 we use EXCLUDE_FROM_ALL flag to do that, but
425+ # for older versions we need to use FetchContent_Populate.
426+ if (CMAKE_VERSION VERSION_LESS 3.28)
427+ FetchContent_Declare(
428+ level-zero-loader
429+ GIT_REPOSITORY ${LEVEL_ZERO_LOADER_REPO}
430+ GIT_TAG ${LEVEL_ZERO_LOADER_TAG} )
431+ FetchContent_Populate(level-zero-loader)
432+ else ()
433+ FetchContent_Declare(
434+ level-zero-loader
435+ GIT_REPOSITORY ${LEVEL_ZERO_LOADER_REPO}
436+ GIT_TAG ${LEVEL_ZERO_LOADER_TAG}
437+ EXCLUDE_FROM_ALL )
438+ FetchContent_MakeAvailable(level-zero-loader)
439+ endif ()
422440
423441 set (LEVEL_ZERO_INCLUDE_DIRS
424442 ${level-zero-loader_SOURCE_DIR}/include
@@ -457,13 +475,24 @@ if(UMF_BUILD_CUDA_PROVIDER)
457475
458476 message (
459477 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)
478+
479+ # We don't want to build and include CUDA binaries to our install
480+ # target. For CMake >= 3.28 we could use EXCLUDE_FROM_ALL flag to do
481+ # that, but for older versions we need to use FetchContent_Populate.
482+ if (CMAKE_VERSION VERSION_LESS 3.28)
483+ FetchContent_Declare(
484+ cuda-headers
485+ GIT_REPOSITORY ${CUDA_REPO}
486+ GIT_TAG ${CUDA_TAG} )
487+ FetchContent_Populate(cuda-headers)
488+ else ()
489+ FetchContent_Declare(
490+ cuda-headers
491+ GIT_REPOSITORY ${CUDA_REPO}
492+ GIT_TAG ${CUDA_TAG}
493+ EXCLUDE_FROM_ALL )
494+ FetchContent_MakeAvailable(cuda-headers)
495+ endif ()
467496
468497 set (CUDA_INCLUDE_DIRS
469498 ${cuda-headers_SOURCE_DIR}
0 commit comments