Search code examples
debuggingcmaketracedifferencecmdline-args

What is the difference between cmdline options --trace and --debug-output in cmake?


Does the "--trace" option show more details than "--debug-output" does? cmake -h does not explain much.


Solution

  • The documentation seems to be pretty clear on that:

    For --debug-output it

    prints extra information during the cmake run like stack traces with message(SEND_ERROR) calls.

    And --trace flag simply makes CMake to print every command it is executing. It helps to see how loops or macros are executed, because commands are outputted in flattened form.