Skip to content
Snippets Groups Projects
Commit 4fab07f3 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Fetch cmake modules at configure-time

Instead of using a submodule. See Scott (2023 k1077, § 39.6.2 "Sharing
CMake Modules And Commands"). The drawbacks are: the directory cmake
is duplicated in each build directory; configuration requires a
network connection. The advantages are: it is easier to download the
project without git; we can more easily package a release.
parent b662e73f
No related branches found
No related tags found
No related merge requests found
[submodule "cmake"]
path = cmake
url = https://github.com/lguez/cmake
...@@ -2,7 +2,11 @@ cmake_minimum_required(VERSION 3.20...3.27) ...@@ -2,7 +2,11 @@ cmake_minimum_required(VERSION 3.20...3.27)
project(Detection_eddies LANGUAGES Fortran) project(Detection_eddies LANGUAGES Fortran)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release Profile set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release Profile
RelWithDebInfo) RelWithDebInfo)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") include(FetchContent)
FetchContent_Declare(LG_cmake_utils GIT_REPOSITORY
https://gitlab.in2p3.fr/guez/cmake.git GIT_TAG 517d97c3)
FetchContent_MakeAvailable(LG_cmake_utils)
list(APPEND CMAKE_MODULE_PATH "${lg_cmake_utils_SOURCE_DIR}")
find_package(NetCDF_Fortran REQUIRED) find_package(NetCDF_Fortran REQUIRED)
find_package(MPI) find_package(MPI)
......
Subproject commit c49b86c38a01ab90b665f41d0cc606f499157eae
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment