Closed
Description
I have a CMake project that has private submodules. The project's CMake configuration process will acquire the public submodules that I need. Therefore, I've used the following git-related options:
GIT_SUBMODULES ""
GIT_SUBMODULES_RECURSE FALSE
According to the CMake documentation, with this set, FetchContent_Declare
(and, by extension, ExternalProject_Add
) will not clone submodules, as long as CMP0096 is set to NEW
. So I did that at the top of my project:
cmake_policy(VERSION 3.25)
cmake_policy(SET CMP0096 NEW)
However, the arguments I set in CPMAddPackage
(GIT_SUBMODULES
and GIT_SUBMODULES_RECURSE
) are ignored, and all submodules are cloned anyway. Is this a bug in CPM? Logically this should work perfectly fine, but it isn't for some reason.
Metadata
Metadata
Assignees
Labels
No labels