From 32de5f53763125925e078498250f7e73a88de9ed Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Wed, 23 Dec 2009 00:13:23 +0000 Subject: Fixes a slew of compiler warnings and turns on "warning as error" in the scons build. --- scons/SConscript | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'scons') diff --git a/scons/SConscript b/scons/SConscript index 73c5b916..7c2bfbf6 100644 --- a/scons/SConscript +++ b/scons/SConscript @@ -105,9 +105,19 @@ GtestTest = gtest_exports['GtestTest'] gtest_common_exports = SConscript(GTEST_DIR + '/scons/SConscript.common') EnvCreator = gtest_common_exports['EnvCreator'] -# TODO(vladl@google.com): restore warnings as errors once all warnings are fixed -# in gMock. -env = EnvCreator.Create(env, EnvCreator.WarningOk) +env = env.Clone() +if env['PLATFORM'] == 'win32': + env.Append(CCFLAGS=[ + '-wd4127', # Disables warning "conditional expression is constant", + # triggered by VC 8.0's own STL header . + '-wd4702', # Disables warning "unreachable code", triggered by VC + # 7.1's own STL header . + '-wd4675', # Disables warning "resolved overload was found by + # argument-dependent lookup" generated by VC 7.1. + # It just says that VC 7.1 fixed a bug in earlier + # versions of VC so the code behavior will be + # different than compiled with VC 6.0, for example. + ]) # Note: The relative paths in SConscript files are relative to the location # of the SConscript file itself. To make a path relative to the location of -- cgit v1.2.3