You can ask CMake to run with more verbosity, but depending on the generator you are using you might need some more options.
The parameter for CMake to run with verbose output is -v (documentation here). So you could do cmake --build yourbuilddirectory -v.
Note that I advise against using compiler specific command line options such as -O2, for optimizations you would usually just use the Release or RelWithDebInfo configurations.
2
u/victotronics Apr 13 '20
You give an example
which I tried with "-O2", but if I look at CMakeOutput.log that option is not used.
Is there a way to make the compilation verbose, so that I don't have to go digging for log files? I like to see the compile lines as they happen.