8.1.4. Colcon

8.1.4.1. Background

Your project is built using Colcon.

8.1.4.2. What can be configured?

You can set up

  • analysis of your project by hooking into the generated build files

  • an Axivion toolchain to hook into the generation process for the build files

8.1.4.3. What needs to be done?

Colcon wraps around CMake, so the basic idea is to proceed as outlined in CMake.

However, as Colcon wraps CMake, you cannot set different environment variables during the generation phase (e.g. COMPILE_ONLY=1) and the build phase (e.g. COMPILE_ONLYIR=1).

The alternative is to set the environment variable AXIVION_COLCON (to any value), which puts the Axivion toolchain in a mode where the Axivion wrappers injected by the Axivion CMake toolchain inspect the process tree upwards. If they find a cmake --build ... process amongst the process ancestors, only the IR files are created (as if COMPILE_ONLYIR=1 was set); otherwise, the original build tools are involved (as if COMPILE_ONLY=1 was set).