[cmake-developers] Ninja Generator and CMAKE_VERBOSE_MAKEFILE

Gregor Jasny gjasny at googlemail.com
Wed Feb 25 12:38:51 EST 2015


Hello,

For our CI and production build we call cmake --build to execute the
actual build. To be able to examine the build logs we added
-DCMAKE_VERBOSE_MAKEFILE=ON to the configuration step. This worked as
expected for the Makefile generator but is ignored for Ninja.

As far as I understand the code, the Makefile generator adds a VERBOSE
statement to the Makefile so that make automatically switches to verbose
mode when being executed.

Unfortunately 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 think that this is a reasonable approach could you please give me
some pointers where to insert the necessary code?

Thanks,
Gregor


More information about the cmake-developers mailing list