cmake, print compile/link commands

MakefileCmake

Makefile Problem Overview


Can somebody please enlighten me as to what the command line flag to CMake might be that will make it print out all the compile/link commands it executes?

I can't find this anywhere in the documentation. Many hours of my life have just evaporated. I'd just like to verify it's doing what I think it is, (then banish the infernal build system altogether and replace it with a GNU Makefile). Thank you!

Makefile Solutions


Solution 1 - Makefile

The verbose argument should do what you want.

Content copied (with format adjusted slightly) here for future reference:

> CMake/Verbose output > > CMake has a nice colored output which hides the commandline. This is pretty to look at in the long run but sometimes when you write your configurations you want to know if you got all the compiler flags right. There is two ways to disable the pretty output, well, it's essentialy the same but still two different ways. > > The first way is to simply run make with the additional argument "VERBOSE=1". This will show each command being run for this session, which is the most useful way to see if the flags is correct: > > make VERBOSE=1 > > The second way is to permanently disable the pretty output in your CMakeLists.txt by setting CMAKE_VERBOSE_MAKEFILE: > > set( CMAKE_VERBOSE_MAKEFILE on ) > > Content is available under Attribution-ShareAlike 2.5 unless otherwise noted.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionmr grumpyView Question on Stackoverflow
Solution 1 - MakefileYouView Answer on Stackoverflow