CMake 3.30: Calling FetchContent_Populate() is deprecated
gerhardol opened this issue · comments
New warning with updated CMake 3.30-rc3:
CMake Warning (dev) at /usr/local/src/cmake-3.30.0/share/cmake-3.30/Modules/FetchContent.cmake:1942 (message):
Calling FetchContent_Populate(MyTools) is deprecated, call
FetchContent_MakeAvailable(MyTools) instead. Policy CMP0169 can be set
to OLD to allow FetchContent_Populate(MyTools) to be called directly for
now, but the ability to call it with declared details will be removed
completely in a future version.
Call Stack (most recent call first):
/home/t052809/gu/git_sync/gev/avap_applicationupdater/avap-util/CMakeConfig/cpm/CPM.cmake:1077 (FetchContent_Populate)
/home/t052809/gu/git_sync/gev/avap_applicationupdater/avap-util/CMakeConfig/cpm/CPM.cmake:849 (cpm_fetch_package)
CMakeLists.txt:7 (cpmaddpackage)
This warning is for project developers. Use -Wno-dev to suppress it.
This discussion: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9552#note_1526701 might be useful
Hi! I'm experiencing this warning when using CPM 0.40.0. From the discussion I see that the single argument of FetchContent_Populate is being deprecated which is what we use:
Lines 1073 to 1079 in d416d9b
We should either use the full set of parameters or just move to the _MakeAvailable
alternative.