diff options
author | Yun Peng <pcloudy@google.com> | 2017-01-26 16:20:40 +0000 |
---|---|---|
committer | Laszlo Csomor <laszlocsomor@google.com> | 2017-01-26 23:01:33 +0000 |
commit | f8479bfba14c4add2e7064a91405b300c66ed9ad (patch) | |
tree | a9e103f9ae6d1769b50c38a8f0277109b1b6dafb /tools/cpp/wrapper/bin | |
parent | cb8f3e566b43e06b10e6f422197f608b520bb518 (diff) |
msvc_tools.py.tpl: Suppress all warning messages if /w is specified
Fixed #2433
Working towards #1897
--
Change-Id: I62ed4eabac5c788f90b10e9dfe4c9ffee6883097
Reviewed-on: https://cr.bazel.build/8492
PiperOrigin-RevId: 145675987
MOS_MIGRATED_REVID=145675987
Diffstat (limited to 'tools/cpp/wrapper/bin')
-rw-r--r-- | tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl b/tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl index 96890f72c8..fcaeb8385e 100644 --- a/tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl +++ b/tools/cpp/wrapper/bin/pydir/msvc_tools.py.tpl @@ -387,14 +387,17 @@ class ArgParser(object): # Add in any parsed files self.options += files - if '/w' in self.options: - self.options = [option for option in self.options if option not in ['/W2', '/W3', '/W4']] + # Suppress all warning messages if /w is specified + is_warning_off = '/w' in self.options + if is_warning_off: + self.options = [option for option in self.options + if option not in ['/W2', '/W3', '/W4', '/Wall']] self.is_cuda_compilation = self.IsCudaCompilation() if self.is_cuda_compilation: self.GetOptionsForCudaCompilation() - if self.leftover: + if self.leftover and not is_warning_off: print('Warning: Unmatched arguments: ' + ' '.join(self.leftover)) def NormPath(self, path): |