Skip to content

Commit af6eec4

Browse files
committed
CXX-277 Enable warnings as errors for windows
1 parent df53f37 commit af6eec4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

SConstruct

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -556,12 +556,11 @@ elif windows:
556556
"/wd4800",
557557
])
558558

559-
# some warnings we should treat as errors:
560-
# c4099
561-
# identifier' : type name first seen using 'objecttype1' now seen using 'objecttype2'
562-
# This warning occurs when classes and structs are declared with a mix of struct and class
563-
# which can cause linker failures
564-
env.Append( CCFLAGS=["/we4099"] )
559+
if not has_option("disable-warnings-as-errors"):
560+
env.Append(
561+
CCFLAGS=["/WX"],
562+
LINKFLAGS=["/WX"],
563+
)
565564

566565
env.Append( CPPDEFINES=[
567566
"_CONSOLE",

0 commit comments

Comments
 (0)