[cmake-developers] [PATCH] Discussion needed: FindBISON: refine VERBOSE feature of BISON_TARGET
Eon Jeong
eonikupy at gmail.com
Fri Jul 15 10:35:03 EDT 2016
Thank you clarifying the basic rules.
2016-07-15 22:33 GMT+09:00 Brad King <brad.king at kitware.com>:
>> 3.5. [VERBOSE [<file>]] and [REPORT_FILE <file>]. In this case, <file>
>> argument of [VERBOSE <file>] can be either ignored or used (copying
>> the report file.) This does not break compatibility at all
>
> I think this is the best solution. One could also reject use of
> both <file> options at the same time.
[VERBOSE [<file>]] was my hope, but it's not easy. Since FindBISON now
uses CMakeParseArguments, a keyword can't be used both as an option
and as a one-value keyword.
Possible solutions are:
- Splitting [VERBOSE <file>] into [VERBOSE] (just `--verbose`) and
[VERBOSE_FILE <file>] (`--verbose` and copy). It breaks the
compatibility slightly, but I think this is an approvable break even
without REPORT_FILE because there was no choice to get just
default-named output file. In this case, "VERBOSE", "VERBOSE
REPORT_FILE <file>" or "VERBOSE_FILE <file>" or any combinations can
be used.
- Let [VERBOSE <file>] and [REPORT_FILE <file>] independently exist.
[VERBOSE <file>] means `--verbose` and copying to <file>, and
[REPORT_FILE <file>] means `--report-file <file>` *and `--verbose`*.
cf. In bison, `--report-file <file>` does not imply `--verbose`.
- Extending CMakeParseArguments so a one-value keyword can be also
used as options when it's passed both in <options> and
<one_value_keywords>. Then combinations "VERBOSE", "VERBOSE <file>",
"VERBOSE REPORT_FILE <file>", "VERBOSE <file> REPORT_FILE <file>" can
be used.
- Not using CMakeParseArguments.
Sorry for making mistake. I was thinking wrong about how
CMakeParseArguments works.
Thanks,
Eon
More information about the cmake-developers
mailing list