summaryrefslogtreecommitdiff
path: root/methods.py
diff options
context:
space:
mode:
Diffstat (limited to 'methods.py')
-rw-r--r--methods.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/methods.py b/methods.py
index 00c477635e..0cf05751a8 100644
--- a/methods.py
+++ b/methods.py
@@ -19,6 +19,18 @@ def add_source_files(self, sources, filetype, lib_env=None, shared=False):
sources.append(self.Object(path))
+def disable_warnings(self):
+ # 'self' is the environment
+ if self.msvc:
+ # We have to remove existing warning level defines before appending /w,
+ # otherwise we get: "warning D9025 : overriding '/W3' with '/w'"
+ 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'])
+ else:
+ self.Append(CCFLAGS=['-w'])
+
+
def add_module_version_string(self,s):
self.module_version_string += "." + s