environment is the deployment unit used to reuse configuration of host system with various build tools, and particularly compilers in use. It contains:
- CMake scripts used to configure to host system with given tools.
- Eventually prebuild binaries, possibly for various build tool versions and host platforms.
- git version control information.
- CMake projects files used to generate CMake build tool configuration files (also called toolchain files) or CMake script files used to tune pakages configuration process using for instance new tools (for writing plugins to PID).
environments have been imagined to simplify host confuguration management, since it can become quite complex to provide a valid configuration of host to a team of developpers. Using predefined environments, they do not have to bother too much about configuring their host with adequate build tools and they can reuse/improve this configuration along development process.
An environment is another kind of deployment unit of PID, and so it is in the same time a CMake project and a git repository.
An environment is a CMake project structured according to the standard folder hierarchy defined below:
- the root folder of the environment has the name of the environment. This folder is basically a git repository which allows to manage concurrent work and version control on a package’s content.
.gitfolder contains version control related information, automatically managed by the git tool.
- the root
.gitignorefile is used to exclude from version control some artefacts like temporary files.
CMakeLists.txtfile defines the process used to configure the workspace. It also contains meta-information on the environment (authors and institutions, repository address, license, etc.).
buildfolder is from where configuration is perfomed.
srcfolder contains hand written cmake scripts that really implement the configuration process.
sharefolder contains some specific cmake files used by the build process.
license.txtfile contains the license that applies to the environment source code itself (the CMake code). This file is generated by the build process.
README.mdfile contains the text presenting the environment in the source project online site.
Environments, as any deployment unit, are also
git repositories, whose content is structured according to the previously defined pattern.
git is used to version all text files and
git-lfs may be used if the repository also contains binaries or archives.
Contrarily to packages, there is no semantic version for an environment project.