Skip to content

Commit

Permalink
Prevent a deprecation warning with CMake FetchContent_Populate
Browse files Browse the repository at this point in the history
CMake 3.30 introduces a deprecation warning on all calls
FetchContent_Populate(<name>)
with only the name
  • Loading branch information
pierre-dejoue committed Dec 2, 2024
1 parent 579e5cc commit d81a377
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
3 changes: 1 addition & 2 deletions cmake/third_party/argagg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ endif()
message(STATUS "Third-party: argagg")

include(FetchContent)
FetchContent_Declare(
FetchContent_Populate(
argagg
GIT_REPOSITORY https://github.com/vietjtnguyen/argagg.git
GIT_TAG 6cd4a64ae09795c178d9ccba6d763c5fc9dcb72a
)
FetchContent_Populate(argagg)

add_library(argagg-lib INTERFACE)

Expand Down
4 changes: 1 addition & 3 deletions cmake/third_party/catch2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ endif()
message(STATUS "Third-party: catch2")

Include(FetchContent)
FetchContent_Declare(
FetchContent_Populate(
catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0
)

FetchContent_Populate(catch2)

add_library(Catch2WithMain STATIC
${catch2_SOURCE_DIR}/extras/catch_amalgamated.cpp
${catch2_SOURCE_DIR}/extras/catch_amalgamated.hpp
Expand Down
3 changes: 1 addition & 2 deletions cmake/third_party/imgui.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ endif()
message(STATUS "Third-party: imgui")

include(FetchContent)
FetchContent_Declare(
FetchContent_Populate(
imgui
GIT_REPOSITORY https://github.com/ocornut/imgui.git
GIT_TAG v1.91.0
)
FetchContent_Populate(imgui)
3 changes: 1 addition & 2 deletions cmake/third_party/pfd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ endif()
message(STATUS "Third-party: pfd")

include(FetchContent)
FetchContent_Declare(
FetchContent_Populate(
pfd
GIT_REPOSITORY https://github.com/samhocevar/portable-file-dialogs.git
GIT_TAG 7f852d88a480020d7f91957cbcefe514fc95000c
)
FetchContent_Populate(pfd)

add_library(pfd
INTERFACE
Expand Down
3 changes: 1 addition & 2 deletions cmake/third_party/pnm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ endif()
message(STATUS "Third-party: pnm")

include(FetchContent)
FetchContent_Declare(
FetchContent_Populate(
pnm
GIT_REPOSITORY https://github.com/ToruNiina/pnm.git
GIT_TAG v1.0.1
)
FetchContent_Populate(pnm)

add_library(pnm++ INTERFACE)

Expand Down

0 comments on commit d81a377

Please sign in to comment.