Skip to content

Super-build of external project modules #528

Open
@schuhschuh

Description

@schuhschuh

Issue by schuhschuh
Monday Jan 04, 2016 at 09:08 GMT
Originally opened as cmake-basis/legacy#528


Instead of including external modules as Git submodules, it would be better when these external modules would be build using the ExternalProject.cmake module. The top-level project will only contain the/a BasisProject.cmake with the meta-data of the external project such as its dependencies on external packages and other project modules as well as the module name. The accompanying CMakeLists.txt file will instead of basis_project_impl call a new macro such as:

basis_add_external_project(GIT_REPOSITORY <url>)

The arguments such as the download options are passed on to the ExternalProject_Add command. Other arguments for ExternalProject_Add are retrieved from the BasisProject.cmake file. Most importantly, this file defines the external and internal dependencies of the module which have to be looked for during the configuration of the top-level project and the location of the found dependencies must be passed on to the configure command used by ExternalProject_Add. The information of the BasisProject.cmake file should be sufficient for simple BASIS-based project modules. Modules which have additional options and build settings may need further arguments to be passed in the CMakeLists.txt file of the external module to the ExternalProject_Add command.

This approach can in the future also be used to add non-BASIS-based projects as modules of a BASIS-based top-level project. Eventually this could be extended to build third-party dependencies as external modules with other project modules depending on these external dependencies.

Related issue of #274.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions