mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
SCons: Fix MSVC bypassing disabled warnings
This commit is contained in:
parent
aa8d9b83f6
commit
070aeb5688
7 changed files with 55 additions and 67 deletions
|
@ -130,9 +130,10 @@ def disable_warnings(self):
|
|||
if self.msvc and not using_clang(self):
|
||||
# We have to remove existing warning level defines before appending /w,
|
||||
# otherwise we get: "warning D9025 : overriding '/W3' with '/w'"
|
||||
self["CCFLAGS"] = [x for x in self["CCFLAGS"] if not (x.startswith("/W") or x.startswith("/w"))]
|
||||
self["CFLAGS"] = [x for x in self["CFLAGS"] if not (x.startswith("/W") or x.startswith("/w"))]
|
||||
self["CXXFLAGS"] = [x for x in self["CXXFLAGS"] if not (x.startswith("/W") or x.startswith("/w"))]
|
||||
WARN_FLAGS = ["/Wall", "/W4", "/W3", "/W2", "/W1", "/W0"]
|
||||
self["CCFLAGS"] = [x for x in self["CCFLAGS"] if x not in WARN_FLAGS]
|
||||
self["CFLAGS"] = [x for x in self["CFLAGS"] if x not in WARN_FLAGS]
|
||||
self["CXXFLAGS"] = [x for x in self["CXXFLAGS"] if x not in WARN_FLAGS]
|
||||
self.AppendUnique(CCFLAGS=["/w"])
|
||||
else:
|
||||
self.AppendUnique(CCFLAGS=["-w"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue