Skip to content

Commit

Permalink
Also disable C and C++ specific warnings in thirdparty code
Browse files Browse the repository at this point in the history
Move the `Append` up to make sure that the keys exist and avoid the
need to check `if CPPFLAGS in self`, etc.
  • Loading branch information
akien-mga committed Apr 24, 2019
1 parent 6cf7cfa commit 8d867cf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ def disable_warnings(self):
# 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'])
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:
self.Append(CCFLAGS=['-w'])
self.Append(CFLAGS=['-w'])
self.Append(CPPFLAGS=['-w'])


def add_module_version_string(self,s):
Expand Down

0 comments on commit 8d867cf

Please sign in to comment.