Skip to content

Commit 9bb257c

Browse files
authored
Replace FetchContent_Populate by FetchContent_MakeAvailable (#4310)
```bash CMake Warning (dev) at C:/Users/vagrant/AppData/Local/Temp/pip-build-env-blxl_9th/overlay/Lib/site-packages/cmake/data/share/cmake-4.0/Modules/FetchContent.cmake:1953 (message): Calling FetchContent_Populate(spirv-llvm-translator) is deprecated, call FetchContent_MakeAvailable(spirv-llvm-translator) instead. Policy CMP0169 can be set to OLD to allow FetchContent_Populate(spirv-llvm-translator) to be called directly for now, but the ability to call it with declared details will be removed completely in a future version. ``` --------- Signed-off-by: Anatoly Myachev <[email protected]>
1 parent f4495f7 commit 9bb257c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

third_party/intel/cmake/FindSPIRVToLLVMTranslator.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (NOT SPIRVToLLVMTranslator_FOUND)
2020

2121
FetchContent_GetProperties(spirv-llvm-translator)
2222
if(NOT spirv-llvm-translator_POPULATED)
23-
FetchContent_Populate(spirv-llvm-translator)
23+
FetchContent_MakeAvailable(spirv-llvm-translator)
2424

2525
# FIXME: Don't apply patch when Agama driver is updated.
2626
execute_process(
@@ -35,7 +35,6 @@ if (NOT SPIRVToLLVMTranslator_FOUND)
3535
set(LLVM_CONFIG ${LLVM_LIBRARY_DIR}/../bin/llvm-config)
3636
set(LLVM_DIR "${LLVM_LIBRARY_DIR}/cmake/llvm" CACHE PATH "Path to LLVM build dir " FORCE)
3737
set(LLVM_SPIRV_BUILD_EXTERNAL YES CACHE BOOL "Build SPIRV-LLVM Translator as external" FORCE)
38-
add_subdirectory(${spirv-llvm-translator_SOURCE_DIR} ${spirv-llvm-translator_BINARY_DIR})
3938
endif()
4039

4140
set(SPIRVToLLVMTranslator_INCLUDE_DIR "${SPIRVToLLVMTranslator_SOURCE_DIR}/include"

unittest/googletest.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ FetchContent_Declare(
1515
FetchContent_GetProperties(googletest)
1616

1717
if(NOT googletest_POPULATED)
18-
FetchContent_Populate(googletest)
18+
FetchContent_MakeAvailable(googletest)
1919
if (MSVC)
2020
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
2121
endif()
22-
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
2322
endif()

0 commit comments

Comments
 (0)