mirror of https://github.com/ecmwf/eccodes.git
Fetch ecbuild if not downloaded before
This commit is contained in:
parent
ff5ab61c8d
commit
526ca4bb32
|
@ -18,7 +18,18 @@
|
||||||
|
|
||||||
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
|
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
|
||||||
|
|
||||||
find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
|
find_package( ecbuild 3.7 HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
|
||||||
|
if(NOT ecbuild_FOUND)
|
||||||
|
message(STATUS "Fetching ecbuild...")
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
ecbuild
|
||||||
|
GIT_REPOSITORY https://github.com/ecmwf/ecbuild.git
|
||||||
|
GIT_TAG 3.8.5
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(ecbuild)
|
||||||
|
find_package( ecbuild 3.7 REQUIRED )
|
||||||
|
endif()
|
||||||
|
|
||||||
# Initialise project
|
# Initialise project
|
||||||
project( eccodes LANGUAGES CXX )
|
project( eccodes LANGUAGES CXX )
|
||||||
|
|
Loading…
Reference in New Issue