Le mer. 19 sept. 2018 à 13:43, Dennis Luehring <dl.so...@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
-- 

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to