@@ -3,7 +3,53 @@ BUILD_ENV = AUTO
33
44# Enable all warnings and treat them as errors
55ifeq ($(BUILD_ENV ), MSVC )
6- # CXXFLAGS += /Wall /WX
6+ CXXFLAGS += /Wall /WX
7+ # disable warning "decorated name length exceeded"
8+ CXXFLAGS += /wd4503
9+ # disable deprecation warnings
10+ CXXFLAGS += /wd4996
11+ # disable warning "unreferenced inline function has been removed"
12+ CXXFLAGS += /wd4514
13+ # disable warning "padding added after data member"
14+ CXXFLAGS += /wd4820
15+ # disable warning "function not inlined"
16+ CXXFLAGS += /wd4710
17+ # disable warning "layout of class may have changed from a previous version of
18+ # the compiler due to better packing of member"
19+ CXXFLAGS += /wd4371 /wd4435
20+ # disable warning "conditional expression is constant"
21+ CXXFLAGS += /wd4127
22+ # disable warning "behavior change ... called instead of ..."
23+ CXXFLAGS += /wd4350
24+ # disable warning "assignment operator could not be generated"
25+ CXXFLAGS += /wd4512 /wd4626
26+ # disable warning "default/copy constructor could not be generated"
27+ CXXFLAGS += /wd4623 /wd4510 /wd4625 /wd4610
28+ # disable warning "no override available, function is hidden"
29+ CXXFLAGS += /wd4266
30+ # disable warning "unreferenced local function has been removed"
31+ CXXFLAGS += /wd4505
32+ # disable warning "'this' used in base member initializer list" - which would
33+ # be useful to have, but it's not always clear where to put a silencing pragma
34+ CXXFLAGS += /wd4355
35+ # disable warning "#pragma warning(pop): likely mismatch, popping warning
36+ # state pushed in different file"
37+ CXXFLAGS += /wd5031 /wd5032
38+ # disable warning "move constructor/assignment operator was implicitly defined
39+ # as deleted"
40+ CXXFLAGS += /wd5026 /wd5027
41+ # disable warning "Informational: catch(...) semantics changed since Visual
42+ # C++ 7.1; structured exceptions (SEH) are no longer caught"
43+ CXXFLAGS += /wd4571
44+ # disable warning "Compiler will insert Spectre mitigation with /Qspectre"
45+ CXXFLAGS += /wd5045
46+ # disable warning "signed/unsigned mismatch" as VS2017 STL headers yield it
47+ # CXXFLAGS += /wd4365
48+ # disable warning "format string expected is not a string literal" as VS2017 STL headers yield it
49+ CXXFLAGS += /wd4774
50+ # disable warning "#pragma warning: there is no warning number '...'" to
51+ # support multiple Visual Studio versions
52+ CXXFLAGS += /wd4619
753else
854 CXXFLAGS += -Wall -pedantic -Werror -Wswitch -enum
955 CXXFLAGS += -Wno -deprecated -declarations
0 commit comments