On the man page for add_compile_options() I see no mention of how to change the flags of the Release / Debug compiler. Can you use add_compiler_options() to change the flags of the Release / Debug compiler? If so, how?
If not, the recommended canonical method for modifying the variables cmake release / debug [1], as described here ?
[1] ie set cmake variables CMAKE_ <LANG> _FLAGS_ <TYPE> (for lang c / C ++ it will be: CMAKE_CXX_FLAGS_RELEASE, CMAKE_CXX_FLAGS_DEBUG, CMAKE_C_FLAGS_RELEASE, CMAKE_C_FLAGSDEB.
source share