Title Create custom build configs with ccmake through
Priority feature Status chatting
Superseder Nosy List florian, jendrik, malte
Assigned To florian Keywords
Optional summary

Created on 2016-01-08.18:28:02 by florian, last changed by malte.

msg5057 (view) Author: malte Date: 2016-01-08.18:44:45
I prefer the first choice, with some caveats.

There is a general design principle for robust scripts that states that there
must a mechanism for avoiding accidental capture of options, so that it is
possible to write scripts that are correct for arbitrary arguments. If "aliases"
is a list of aliases and "make_options" is a list of options to be passed to
make, there must be an algorithm that produces an option string that leads to
the correct interpretation. The usual way to achieve this is by making order
matter and using delimiters like "--" to disambiguate where necessary. (I
suggest to discuss these details offline.)
msg5056 (view) Author: florian Date: 2016-01-08.18:28:02
We would like to have a shortcut for creating and configuring custom builds with
ccmake. This is a bit tricky, because we currently recognize the name of the
build because it is a known alias. So while we could configure a build with
  ./ --ccmake unknown_name
we could not build it later with
  ./ unknown_name
In the second call, "unknown_name" will be interpreted as an argument for make
of the default config release32.

We could change the behaviour of in the following way: All arguments
that are known aliases are configs (as before) but we also consider all
arguments "foo" as configs if there is a directory "builds/foo". For each alias
config that does not already have a build directory, we create one and call
CMake with the correct parameters. Then we call make for all configs forwarding
all remaining arguments of The only options that are excluded from
this are the ones we specifically parse (--help, --debug, and --ccmake).

We could alternatively add an option --build, so that
  ./ --build unknown_name
would call ccmake if "builds/unknown_name" does not exist and make otherwise. In
this case, I would still allow aliases to be passed without the option, so we
can still write
  ./ release32
instead of (or in addition to)
  ./ --build release32

What do you think?
Date User Action Args
2016-01-08 18:44:45maltesetstatus: unread -> chatting
messages: + msg5057
2016-01-08 18:28:02floriancreate