tags:

views:

219

answers:

3

I use Cmake with GNU Make and would like to see all commands exactly (for example how the compiler is executed, all the flags etc)

GNU make has --debug, but it does not seem to be that helpful are there any other options? Does Cmake provide additional flags in the generated Makefile for debugging purpose?

A: 

http://www.faqs.org/docs/artu/ch10s05.html

try -v

(verbose)

Romain Hippeau
Version (without argument). Display program's version on standard output and exit. Examples: cvs(1), chattr(1), patch(1), uucp(1). More usually this action is invoked by -V.
Nils
@Nils Actually according to docs -V is version -v is verbose
Romain Hippeau
macbook:~ nils$ make -vGNU Make 3.81Copyright (C) 2006 Free Software Foundation, Inc.This is free software; see the source for copying conditions.There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR APARTICULAR PURPOSE.This program built for i386-apple-darwin10.0does it? :D
Nils
@Nils I guess the docs are wrong - what if you do the -V does it write out all the info you need ?
Romain Hippeau
+5  A: 

When you run make, add VERBOSE=1 to see the full command output. For example:

cmake .
make VERBOSE=1

Or you can add -DCMAKE_VERBOSE_MAKEFILE=ON to the cmake command for permanent verbose command output from the generated Makefiles.

cmake -DCMAKE_VERBOSE_MAKEFILE=ON .
make
rq
+1  A: 

If you use the CMake GUI then swap to the advanced view and then the option is called CMAKE_VERBOSE_MAKEFILE.

SteveL