Skip to content

Commit 789f78d

Browse files
committed
Fix CMake deprecation warnings
1 parent afd9b2f commit 789f78d

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

cmake/PackageProject.cmake

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,12 @@ function(myproject_package_project)
155155
unset(_PackageProject_TARGETS)
156156

157157
# download ForwardArguments
158-
FetchContent_Declare(
158+
FetchContent_Populate (
159159
_fargs
160160
URL https://github.com/polysquare/cmake-forward-arguments/archive/8c50d1f956172edb34e95efa52a2d5cb1f686ed2.zip)
161+
161162
FetchContent_GetProperties(_fargs)
162-
if(NOT _fargs_POPULATED)
163-
FetchContent_Populate(_fargs)
164-
endif()
163+
165164
include("${_fargs_SOURCE_DIR}/ForwardArguments.cmake")
166165

167166
# prepare the forward arguments for ycm
@@ -177,11 +176,8 @@ function(myproject_package_project)
177176
"${_multiValueArgs};DEPENDENCIES;PRIVATE_DEPENDENCIES")
178177

179178
# download ycm
180-
FetchContent_Declare(_ycm URL https://github.com/robotology/ycm/archive/refs/tags/v0.13.0.zip)
179+
FetchContent_Populate(_ycm URL https://github.com/robotology/ycm/archive/refs/tags/v0.13.0.zip)
181180
FetchContent_GetProperties(_ycm)
182-
if(NOT _ycm_POPULATED)
183-
FetchContent_Populate(_ycm)
184-
endif()
185181
include("${_ycm_SOURCE_DIR}/modules/InstallBasicPackageFiles.cmake")
186182

187183
install_basic_package_files(${_PackageProject_NAME} "${_FARGS_LIST}")

0 commit comments

Comments
 (0)