On 02/25/2015 12:38 PM, Gregor Jasny wrote:
> Ninja has no equivalent option.
> 
> As a work-around would it be possible that cmake --build examines the
> cache, detects CMAKE_VERBOSE_MAKEFILE=ON and adds a -v to the Ninja
> invocation?

If you know that the build tree was generated with the Ninja generator
then you can do

 cmake --build . -- -v

to pass the flag to ninja.  Of course if you knew that then you could
always run "ninja -v" instead of using "cmake --build" ;)

> As a work-around would it be possible that cmake --build examines the
> cache, detects CMAKE_VERBOSE_MAKEFILE=ON and adds a -v to the Ninja
> invocation?
> 
> If you think that this is a reasonable approach could you please give me
> some pointers where to insert the necessary code?

Yes, I think that is reasonable if the above is not sufficient.

The cmake::Build method in Source/cmake.cxx loads the cache already
to get CMAKE_GENERATOR and create the generator, which is then used
to compute the generator-specific build command.  You could extract
CMAKE_VERBOSE_MAKEFILE there too and extend the signatures of the
methods as necessary to thread the value through.

-Brad

-- 

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