ExternalProject_Add should give the option to turn off recursive submodules
My project is referencing the EASTL library, whose latest version uses submodules in a non-conventional way, which introduces circular dependencies between them. This produces errors when updating submodules recursively.
However, there's currently no way to tell ExternalProject_Add to not update submodules recursively. I tried setting fetch.recurseSubmodules=false and submodule.recurse=false to no avail. The only workaround right now is to do it like this (requires CMake 3.16 version):
ExternalProject_Add(
eastl
GIT_REPOSITORY https://github.com/electronicarts/EASTL
GIT_TAG 3.14.03
GIT_CONFIG advice.detachedHead=false
GIT_SHALLOW 1
GIT_SUBMODULES ""
UPDATE_COMMAND ""
PATCH_COMMAND git submodule update --init
INSTALL_COMMAND ""
)
...but I'm not sure if patch command should be used for this or not. Either way, there should be a way to disable recursive submodules.
Edited by Charis Marangos