Skip to content

Subproject git modules not cloned recursively #598

@NadirRoGue

Description

@NadirRoGue

When running cmake, a subproject module is initialized and cloned, but this project modules are not cloned, however, causing the build to fail.

execute_process(COMMAND "${GIT_EXECUTABLE}" submodule update --recursive

The reason is that the call to git submodule init is not recursive, not registering the paths of the subproject module's modules, thus when the git submodule update --recursive call is executed, these non registered paths are not cloned.
Executing these 3 commands manually results in the same behaviour.

The test case is Brion https://github.com/BlueBrain/Brion
The scenario where this happens occurs when dealing with its sub module "libsonata". The structure is:

- Brion
    - libsonata
        - HighFive
        - fmt

If Brion is the subproject, when building, libsonata will be cloned, but HighFive and fmt (which are git submodules) will not be cloned.

adding --init to the line pointed above solves the problem, although it clones again CMake/common.

This can be fixed manually by running git submodule udpate --init in the problematic subprojects, however this cannot be applied to the CI jobs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions