use CMake FetchContent instead of git submodules #752
Labels
dependencies
Pull requests that update a dependency file
enhancement
New feature or request
submodules
Pull requests that update Submodules code
Describe the proposal
Git submodules are painful to use. An alternative is to use CMake's FetchContent feature. That requires specifying the git commit that is needed in the CMakeLists.txt file instead:
This requires that the machine on which you run the
cmake ..
configure step has internet access, which is not the case on compute nodes on many clusters. However, the configure step could be run on the login nodes, and then the build step (only) can be run on the compute nodes.The major disadvantage is that GitHub's Dependabot will NOT auto-update the
GIT_TAG
(shown above) to the latest version on a periodic basis (but see this issue: dependabot/dependabot-core#7451). Currently, we depend on Dependabot to do this weekly.Describe alternatives you've considered
Keep using git submodules.
Additional context
It is not possible to edit the source code of the dependency for quick testing purposes, since CMake always fetches and uses the version specified in the CMakeLists.txt file:
https://cmake.org/pipermail/cmake/2019-June/069709.html
The text was updated successfully, but these errors were encountered: