Help: CMAKE_<LANG>_FLAGS(_<CONFIG>) should mention interaction with _INIT variants.
Both are initialized by CMAKE_<LANG>_FLAGS(_<CONFIG>)_INIT
if not already set during compiler detection. If set by users prior to this can cause important flags to go missing causing confusing failures, see #22900 (closed) for an example. The documentation should refer to the _INIT
variants and recommend using those for setting flags prior to compiler detection.
Furthermore, cmake-toolchains(7)
also should recommend using _INIT
variants in the Variables and Properties section.