check_cxx_compiler_flag sets a normal and an internal cache result variable (3.17.0+)
Since [1] and first visible in 3.17.0. This seems to contradict the docs [2] or at least is missing a mention, check_cxx_source_compiles is still setting a cache variable [3].
[1] cb984c66 [2] https://cmake.org/cmake/help/v3.18/module/CheckCXXCompilerFlag.html?highlight=check_cxx_compiler_flag#command:check_cxx_compiler_flag ... Stores the result in an internal cache entry named . [3] https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CheckCXXSourceCompiles.cmake#L127
Edited by Brad King