Merge FetchContent_Declare and FetchContent_Populate

This commit is contained in:
Igor S. Gerasimov 2024-09-07 10:59:26 +02:00
parent 5437cee025
commit f25cedfad2
1 changed files with 1 additions and 3 deletions

View File

@ -22,12 +22,10 @@ find_package( ecbuild 3.7 HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOUR
if(NOT ecbuild_FOUND)
message(STATUS "Fetching ecbuild...")
include(FetchContent)
FetchContent_Declare(
ecbuild
FetchContent_Populate(ecbuild
GIT_REPOSITORY https://github.com/ecmwf/ecbuild.git
GIT_TAG 3.8.5
)
FetchContent_Populate(ecbuild)
find_package( ecbuild 3.7 REQUIRED HINTS ${ecbuild_SOURCE_DIR})
endif()