[CMake] --config Parameter position relevant?
Eric Noulard
eric.noulard at gmail.com
Wed Sep 19 07:59:41 EDT 2018
Le mer. 19 sept. 2018 à 13:43, Dennis Luehring <dl.soluz at gmx.net> a écrit :
> build environment:
>
> Win7 x64
> VStudio 2017 Community Edition 15.8.4 (latest)
> CMake 3.12.1 (x86)
> git 2.19.0 (latest, x64)
> Python 2.7.2 (x86)
>
> directory structure:
>
> D:/projects/fun/jit_tests/clang_from_src/
> llvm <-- git clone https://github.com/llvm-mirror/llvm
> tools
> clang <-- git clone https://github.com/llvm-mirror/clang
> llvm_build
>
> build instructions:
>
> cd llvm-build
> cmake -Thost=x64 -G "Visual Studio 15 2017 Win64"
> -DLLVM_TARGETS_TO_BUILD=host ..\llvm_project\llvm
>
> cmake --config Release --build .
>
> ends after a few seconds without errors with this message last
>
> Build files have been written to:
> D:/projects/fun/jit_tests/clang_from_src/llvm-build
>
> cmake --build . --config Release
>
> do work and the build is running - is it intended that the position of
> the --config parameter is that relevant?
I guess it is because --config is a sub-option of the --build option whose
expected syntax is:
cmake --build <dir> [options] [-- [native-options]]
In the other case the expected syntax is different:
cmake [options] <path-to-existing-build>
See the different expected syntaxes of the cmake command line here:
https://cmake.org/cmake/help/latest/manual/cmake.1.html
That said the "non working" case should probably at least warn about
ignored/unused options on the command line.
However, I suspect that maintaining backward compatible command line
behavior while providing meaningful
error messages may not be easy.
CMake developers may give more precise answer on that "guess".
--
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180919/9f3b9736/attachment.html>
More information about the CMake
mailing list