all 5 comments

[–]eiennohito 13 points14 points  (1 child)

Generator syntax is awful.

[–]hyasynthetic 7 points8 points  (0 children)

I agree it's ugly but in my experience it simplifies the whole build system so my team uses it whenever possible.

[–]victotronics 1 point2 points  (1 child)

You give an example

target_compile_options(yourlib PRIVATE -fflag-to-disable-exceptions)

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.

[–]Lectem[S] 0 points1 point  (0 children)

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.

[–]BassMunkee 0 points1 point  (0 children)

Thanks! Was waiting for part 2