Document CMAKE_<LANG>_FLAGS applying to linker unlike add|target_compile_options()
From this slack thread.
Right now CMAKE_<LANG>_FLAGS
applies to both compiling and linking, but add_compile_options()
only applies to compilation.
https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html and https://cmake.org/cmake/help/latest/command/add_compile_options.html at least seem to imply that they affect the same commands. Compare
The flags in this variable will be passed to the compiler [...] before flags added by the add_compile_options() or target_compile_options() commands
with
These options are used when compiling targets
I guess you could make an argument that the difference between "the compiler" and "compiling" is significant because we use the compiler as the command for linking as well. But that is super subtle and not at all obvious unless you already know about that behavior difference and are trying to justify it retroactively.