It seems that with 3.19, check_c_compiler_flag no longer respects CMAKE_REQUIRED_FLAGS.
check_c_compiler_flag -> cmake_check_compiler_flag
It looks like there are two implementations of cmake_check_compiler_flag one in Modules/Internal/CheckCompilerFlag.cmake and the other in Modules/Internal/CMakeCheckCompilerFlag.cmake.
If the version on CMakeCheckCompilerFlag.cmake wins than CMAKE_REQUIRED_FLAGS and related aren’t respected. Is this expected behavior?
And if so how do you control which version of cmake_check_compiler_flag gets pulled in?