As a consequence of adding the ENABLE_MAINTAINER_FLAGS option to CMakeLists.txt:
https://github.com/mongodb/mongo-c-driver/commit/34c5c96985eb9bdcb669502cf7cd126fb21c4248
There are now thousands of worthless warnings like this when compiling with MSVC in our Evergreen build:
https://github.com/mongodb/mongo-c-driver/commit/34c5c96985eb9bdcb669502cf7cd126fb21c4248 c:\cygwin\home\administrator\mongo-c-driver\src\libbson\src\bson\bson-types.h(297): warning C4820: '<unnamed-tag>': '4' bytes padding added after data member 'data_len' [C:\cygwin\home\Administrator\mongo-c-driver\src\libbson\test-libbson.vcxproj]
The problem seems to be MSVC can accept the "-Wall" flag, but it's badly implemented. MSVC shouldn't warn about code in system headers, but it does, and perhaps these "padding" warnings are completely spurious no matter where they originate.
MSVC doesn't accept any other GCC-style warning options like "-Wformat", so it's a waste of time for CMake to check each of them.
To resolve this, let's skip the entire warning-flags configuration step if the compiler is MSVC.