Skip to content

Commit c9e1bc3

Browse files
committed
Windows : Disable some warnings from external dependencies.
- MSVC seems to be inconsistent with considering headers included via double quotes as external. Rather than breaking with convention and including external dependencies in angle brackets, we disable these warnings until MSVC handles external warnings correctly. - See https://developercommunity.visualstudio.com/t/analyze:external--and-external:I-flags/1688240#T-N1689542 for additional information. They are using `/analyze` but it seems to apply to compiling as well.
1 parent b2ffab0 commit c9e1bc3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

SConstruct

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,6 @@ else:
11791179
"/D_WINDLL",
11801180
"/D_MBCS",
11811181
"/W4",
1182-
"/experimental:external",
11831182
"/external:W0",
11841183
"/Zc:inline", # Remove unreferenced function or data if it is COMDAT or has internal linkage only
11851184
"/GR", # enable RTTI
@@ -1204,6 +1203,13 @@ else:
12041203
"/wd4244", # suppress warning about possible loss of data in type conversion
12051204
"/wd4305", # suppress warning about conversion from double to float
12061205
"/wd4506", # suppress warning about no definition for inline function. Needed for USD::Glf
1206+
# NOTE : the following warnings are generated by external dependencies, even when using /external
1207+
# They may be able to be re-enabled after updating to MSVC 2022.
1208+
"/wd4127", # suppress warning "conditional expression is constant", Needed for USD
1209+
"/wd4456", # suppress warning "declaration of 'x' hides previous local declaration"
1210+
"/wd4459", # suppress warning "declaration of 'x' hides global declaration"
1211+
"/wd4201", # suppress warning "nonstandard extension used : nameless struct/union"
1212+
"/wd4245", # suppress warning "'initializing': conversion from 'int' to 'size_t', signed / unsigned mismatch
12071213
# suppress warning about exported class deriving from non-exported class.
12081214
# Microsoft states (in https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275?view=msvc-170)
12091215
# that "C4275 can be ignored if you are deriving from a type in the

0 commit comments

Comments
 (0)