Hello,
When defining global CMAKE_C_FLAGS/CMAKE_CXX_FLAGS variables for a platform, most of the time we’ll set /WX and -Werror, but also enable extra warnings (or MSVC also has some undocumented ones for C++/CX). I just realized that it makes some checks (like detecting functions or symbols) fail just because they emitted a warning. For example, as we enable deprecated warnings on MSVC, some functions might be detected as unavailable because they are deprecated. Or, when compiling with C++/CX enabled, as all checks are using a regular main function instead of one with the threading model, we get the undocumented C4447 warning and all checks fail.
I guess I could try to set CMAKE_REQUIRED_FLAGS and try to remove the warning-as-errors flag, but at the same time I’m wondering if there’s a better way to do it when you expect other teams to use your project and provide their global compilation flags through CMAKE_C_FLAGS/CMAKE_CXX_FLAGS.