[CMake] Only one target becomes verbose in the makefile

Niko Vuokko niko.vuokko at tkk.fi
Mon Mar 31 05:17:39 EDT 2008


On Monday 31 March 2008 12:07, you wrote:
> 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.

I have just a single project, which contains one small shared library and 
several small executables. I also have just one CMakeLists.txt. Therefore my 
current settings should be enough. I also tried fiddling the cache with 
ccmake, but it didn't change anything.


More information about the CMake mailing list