colcon / colcon.readthedocs.org

https://colcon.readthedocs.org
Creative Commons Attribution 4.0 International
10 stars 27 forks source link

Suggestion: option to provide build configuration via command line argument #82

Open ttikkanen opened 3 years ago

ttikkanen commented 3 years ago

Use case:

We have multiple build configurations stored inside a devops toolkit. Some of them are for developer use, some for CI pipelines.

To change between configurations, I currently have to create a temporary $COLCON_HOME and copy a build configuration there, or change $COLCON_HOME to point out to a directory with the config. However, the latter assumes that the file name is defaults.yaml.

Suggestion

colcon build --config-path /path/to/config

Since providing build arguments via command line is rather clumsy, I would rather use configuration files as the default way to configure. For example providing multiple cmake-args didn't work as expected, due to very careful formatting needed.

dirk-thomas commented 3 years ago

Please consider to contribute a pull request for this feature idea in the colcon-core repository.