Skip to content

Commit 1015c6b

Browse files
authored
Fix CMake deprecation warnings (#109)
* Fix CMake deprecation warnings * Attempt to make it a failure if coverage reports don't post
1 parent 963ed33 commit 1015c6b

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ jobs:
201201
- name: Publish to codecov
202202
uses: codecov/codecov-action@v5
203203
with:
204+
fail_ci_if_error: true # we weren't posting previously
204205
flags: ${{ runner.os }}
205206
name: ${{ runner.os }}-coverage
207+
token: ${{ secrets.CODECOV_TOKEN }}
206208
files: ./build/coverage.xml

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)