A PID environment provides a set of commands to manage its lifecycle. As usual these commands can be called from the
build folder of the environmeny project using the native build tool (e.g.
make) or by using the
pid script directly into the wrapper folder.
If using the build tool, the project must be configured once before using CMake:
We suppose here we use the
pid script but any native build system (e.g.
ninja) can be used with same commands (these commands are then targets for the build tool and arguments are environment variables).
- build: building the environment with given platform and user-defined constraints. Used to test if environment works.
- referencing: Referencing the environment in the workspace.
- update: Update the environment from its official repository.
- hard_clean: Hard cleaning of the environment build tree.
Building the environment
- Effect: evaluates environment against host configuration and if successful generates adequate CMake files used to configure workspace build process. This command is mainly used to test enviroments while they are developped.
platform: specify a constraint on target platform when evaluating environment (e.g.
instance: specify a constraint on target platform instance name to use when evaluating environment (e.g.
proc_type: specify a constraint on target processor type when evaluating environment (e.g.
proc_arch: specify a constraint on target processor architecture (e.g.
os: specify a constraint on target operating system (e.g.
abi: specify a constraint on target C++ ABI (e.g.
distribution: specify a constraint on target distribution (e.g.
distrib_version: specify a constraint on target distribution version.
sysroot: specify a sysroot for crosscompilation.
staging: specify a staging folder for crosscompilation.
- other arguments are environment specific and defined by their respective constraints. A very common specific argument is
versionto specify minimal version of a toolchain and
exactto tell if this required version must exactly match the constraint .
- Evaluating if an environment is usable on your current host.
If we suppose the clang version 3.8 is installed or installable on your host system, the output should be:
It gives the languages that are configured by the nvironment, here the default languages.
- Evaluating if an environment providing extra dev tools is usable in your current host.
pkg-config tool is usable, the output should look like :
This environment provides the possibility to use the
pkg-config program that is an extra tool. Extra tools are those programs that are not natively managed by PID or CMake (like compiler toolchains) but for which we can define plugin mechanism to allow so. Here the
pkg-config environment defines a plugin that activate after components of a package are specified. It automatically generates pkg-config description of the components generated by the package.
Referencing the environment in the workspace
- Effect: generates the reference file for the environment and places it in the adequate folder of the workspace. When done, the environment is known in the local workspace and will be known by all users when workspace official repository will be updated accordingly.
Updating the environment
- Effect: updates the local repository of the environment from its official remote.
Cleaning the environment
- Effect: Cleaning the environment build tree in a agressive and definitive way.