ecbuild_bundle_initialize¶
Initialise the ecBuild environment for a bundle. Must be called before
any call to ecbuild_bundle
.
ecbuild_bundle_initialize()
ecbuild_bundle¶
Declare a subproject to be built as part of this bundle.
ecbuild_bundle( PROJECT <name>
STASH <repository> | GIT <giturl> | SOURCE <path>
[ BRANCH <gitbranch> | TAG <gittag> ]
[ UPDATE | NOREMOTE ] )
[ MANUAL ] )
Options¶
- PROJECTrequired
project name for the Git repository to be managed
- STASHDEPRECATED ; cannot be combined with GIT or SOURCE
Stash repository in the form <project>/<repository>
- GITcannot be combined with STASH or SOURCE
Git URL of the remote repository to clone (see
git help clone
)- SOURCEcannot be combined with STASH or GIT
Path to an existing local repository, which will be symlinked
- BRANCHoptional, cannot be combined with TAG
Git branch to check out
- TAGoptional, cannot be combined with BRANCH
Git tag or commit id to check out
- UPDATEoptional, requires BRANCH, cannot be combined with NOREMOTE
Create a CMake target update to fetch changes from the remote repository
- NOREMOTEoptional, cannot be combined with UPDATE
Do not fetch changes from the remote repository
- MANUALoptional
Do not automatically switch branches or tags
Usage¶
A bundle is used to build a number of projects together. Each subproject needs to be declared with a call to ecbuild_bundle, where the order of projects is important and needs to respect dependencies: if project B depends on project A, A should be listed before B in the bundle.
The first time a bundle is built, the sources of all subprojects are cloned
into directories named according to project in the source tree of the
bundle (which means these directories should be added to .gitignore
).
If the SOURCE
option is used it must point to an existing local
repository on disk and no new repository is cloned. Be aware that using the
BRANCH
or TAG
option leads to the corresponding version being checked
out in that repository!
Subprojects are configured and built in order. Due to being added as a
subproject, the usual project discovery mechanism (i.e. locating and
importing a <project>-config.cmake
file) is not used. Also there are no
<project>-config.cmake
files being generated for individual subprojects.
However there are package-config files being generated for each library.
To switch off a subproject when building a bundle, set the CMake variable
BUNDLE_SKIP_<PNAME>
where PNAME
is the capitalised project name.
ecbuild_bundle_finalize¶
Finalise the ecBuild environment for a bundle. Must be called after the
last call to ecbuild_bundle
.
ecbuild_bundle_finalize()
Options¶
See documentation for ecbuild_install_project() since all arguments are forwarded to an internal call to that macro.
If no arguments are passed, then the default installation NAME is set to the default project name ${CMAKE_PROJECT_NAME}