diff options
author | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2009-12-23 00:13:23 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2009-12-23 00:13:23 +0000 |
commit | 32de5f53763125925e078498250f7e73a88de9ed (patch) | |
tree | cb5de0206e38598a12f10403de146faadcf9cdb0 /scons/SConscript | |
parent | 284b54d3047254a8787e4f5eb9ba62a866caaabd (diff) | |
download | googletest-32de5f53763125925e078498250f7e73a88de9ed.tar.gz googletest-32de5f53763125925e078498250f7e73a88de9ed.tar.bz2 googletest-32de5f53763125925e078498250f7e73a88de9ed.zip |
Fixes a slew of compiler warnings and turns on "warning as error" in the scons build.
Diffstat (limited to 'scons/SConscript')
-rw-r--r-- | scons/SConscript | 16 |
1 files changed, 13 insertions, 3 deletions
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 <list>. + '-wd4702', # Disables warning "unreachable code", triggered by VC + # 7.1's own STL header <xtree>. + '-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 |