瀏覽代碼

Also disable C and C++ specific warnings in thirdparty code

Move the `Append` up to make sure that the keys exist and avoid the
need to check `if CPPFLAGS in self`, etc.

(cherry picked from commit 8d867cf7c5fb4ce0e78b9b62c64d194fdf666874)
Rémi Verschelde 6 年之前
父節點
當前提交
6cd6d3aa16
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      methods.py

+ 7 - 1
methods.py

@@ -24,10 +24,16 @@ def disable_warnings(self):
         # We have to remove existing warning level defines before appending /w,
         # We have to remove existing warning level defines before appending /w,
         # otherwise we get: "warning D9025 : overriding '/W3' with '/w'"
         # otherwise we get: "warning D9025 : overriding '/W3' with '/w'"
         warn_flags = ['/Wall', '/W4', '/W3', '/W2', '/W1', '/WX']
         warn_flags = ['/Wall', '/W4', '/W3', '/W2', '/W1', '/WX']
-        self['CCFLAGS'] = [x for x in self['CCFLAGS'] if not x in warn_flags]
         self.Append(CCFLAGS=['/w'])
         self.Append(CCFLAGS=['/w'])
+        self.Append(CFLAGS=['/w'])
+        self.Append(CPPFLAGS=['/w'])
+        self['CCFLAGS'] = [x for x in self['CCFLAGS'] if not x in warn_flags]
+        self['CFLAGS'] = [x for x in self['CFLAGS'] if not x in warn_flags]
+        self['CPPFLAGS'] = [x for x in self['CPPFLAGS'] if not x in warn_flags]
     else:
     else:
         self.Append(CCFLAGS=['-w'])
         self.Append(CCFLAGS=['-w'])
+        self.Append(CFLAGS=['-w'])
+        self.Append(CPPFLAGS=['-w'])
 
 
 
 
 def add_module_version_string(self,s):
 def add_module_version_string(self,s):