Thank you clarifying the basic rules.

2016-07-15 22:33 GMT+09:00 Brad King <brad.k...@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
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to