Notes |
|
(0041024)
|
Andreas Schuh
|
2016-05-04 10:24
|
|
Actually, the error message seems to suggest that the argument "--target" is taken as the argument of the "--build" option, ignoring the dot ".". Then the name of the target following the "--target" option becomes the positional argument of "cmake" which is the source directory. |
|
|
(0041026)
|
Brad King
|
2016-05-05 08:33
|
|
The command mode is "cmake --build <dir>" followed by other options. This is just like "git clone" has options that must come after "clone" and not before. This is shown in the documented command synopsis:
https://cmake.org/cmake/help/v3.5/manual/cmake.1.html [^]
cmake --build <dir> [<options>] [-- <build-tool-options>...]
|
|
|
(0041027)
|
Andreas Schuh
|
2016-05-05 08:36
|
|
Fair enough. Although there is an important difference between "git clone" and "cmake --build". The first makes it clear the "clone" is a subcommand (cf. Python argparse subcommand) while "--build" suggest it to be just an option... obviously not to be changed now, but I think you see where the assumption that the order of arguments should not matter comes from. |
|
|
(0041038)
|
Antonio
|
2016-05-10 04:19
|
|
I understand the synopsis shows that --build, -E and --find-package have to be given as first, but I think then it should be made explicit in the option description and/or cmake should give a clear error if such an option doesn't appear as first. In fact, calling them "options" makes things ambiguous: staying with the comparison with "git clone", they should be called "commands". |
|
|
(0041039)
|
Brad King
|
2016-05-10 09:47
|
|
|
|
(0041047)
|
Antonio
|
2016-05-11 03:47
|
|
|
|
(0041177)
|
Kitware Robot
|
2016-06-10 14:21
|
|
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|