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?
When you run make, add
VERBOSE=1to see the full command output. For example:Or you can add
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ONto the cmake command for permanent verbose command output from the generated Makefiles.To reduce some possibly less-interesting output you might like to use the following options. The option
CMAKE_RULE_MESSAGES=OFFremoves lines like [ 33%] Building C object…, while--no-print-directorytells make to not print out the current directory filtering out lines likemake[1]: Entering directoryandmake[1]: Leaving directory.