[CMake] Only one target becomes verbose in the makefile

Timenkov Yuri ytimenkov at parallels.com
Mon Mar 31 05:07:43 EDT 2008


On Monday 31 March 2008 13:01:06 Niko Vuokko wrote:
> Hi,
>
> I have
>
> SET(CMAKE_VERBOSE_MAKEFILE TRUE)
This sets CMAKE_VERBOSE_MAKEFILE variable only for current CMakeLists.txt.
If you want verbose output in all projects, you should use something like:
set(CMAKE_VERBOSE_MAKEFILE TRUE CACHE BOOL "Verbose output" FORCE)

Note, that FORCE causes overwriting current value in cache file. This is 
useful for debugging purposes or if you always want to get verbose output.

>
> in my CMakeLists.txt, but CMakeCache.txt says still that
>
> CMakeCache.txt:CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE.
>
> Curiously the first built target (a shared library) prints out the gcc
> command, but the following targets (executables) print out nothing except
> the basic CMake messages during compilation and linking.
>
> I also tried 'make VERBOSE=1' and 'VERBOSE=1 make', but the same thing
> happens! This would mean that CMake gets my variable from CMakeLists, but
> somehow the makefile still hates me.
>
> Thanks for any help you can give.
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake




More information about the CMake mailing list