Closed richiware closed 5 years ago
As far as I understand your description I think this is intended behavior. A default value is a value which is used well by default if the user doesn't specify anything explicitly. If the user passes a custom value that will override the default value.
What you want to use instead is a mixin. Such configuration options are not defaults but will behave in the way you expect them to. When the user passes custom values they will be appended to the information defined in a selected mixin.
Ok. I've presumed the behaviour is to append, not to overwrite. Sorry. Maybe it is useful some comment in the help command.
I have another question now I've discovered the "mixin" command. I will use this issue but I can open a new in the correct repository.
I've tried to add a mixin in the default.yaml
file.
{
"build":
{
"mixin": ["ccache"]
}
}
But it is not working. colcon
is not using the mixin. Is it correct?
Thanks
I've tried to add a mixin in the default.yaml file.
That use case work for me. I assume you have fetched the mixins and ccache
appears in colcon mixin show build
? Have you tried using the mixin manually: colcon build --mixin ccache
?
I have the sample problem that with cmake-args
. I have the ccache
mixin in default.yaml
because I want to enable
ccache always. But at the same time I'm trying to build a project using the commandline argument --mixin rel-with-deb-info
. The commandline argument is overwriting my default mixin. I suppose my use case is not supported.
Thanks for your help.
I have a
default.yaml
where I specify some default cmake options to be passed to my cmake projects.Also I add some default cmake options in some project using
colcon.meta
.If I use
colcon
to build using a command line likecolcon build --paths ../.. --metas ../..
, the cmake projects are configured with the default cmake options. But if I add a cmake option using--cmake-args
likecolcon build --paths ../.. --metas ../.. --cmake-args -DCMAKE_BUILD_TYPE=Debug
, the CMake projects are configured only with the cmake option specified with--cmake-args
.colcon
is not using default values.