Allow disconnected builds of remote modules
Allow/simplify builds of remote modules when no network is available
Currently, OTB requires remote modules to be fetched at cmake configure time. This is problematic for several reasons:
- Build hosts are often isolated for security reasons
- Fetching git HEAD of a branch makes a build non-reproducible, as HEAD may change
Preferably, OTB would allow to supply remote modules as tarballs (or expanded in the appropriate directory).
Although it is possible to download e.g. https://gitlab.orfeo-toolbox.org/jinglada/temporalgapfilling/-/archive/master/temporalgapfilling-master.tar.bz2 and expand it to the correct directory, this is rejected by otb_fetch_content
as the tarball does not contain the .git
subdirectory.
CMake since 3.11 has the FetchContent module which does everything OTBs homegrown fetch code does, but also allows to disable fetching content using the FETCHCONTENT_FULLY_DISCONNECTED
cache variable. Using FetchContent
would require a small bump of the minimum version, from 3.10.2 to 3.11.