summaryrefslogtreecommitdiffstats
path: root/methods.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-28 13:29:52 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-09-28 14:07:39 +0200
commit3a2ca68af3c8bafe9f60f09bd8fece894fe3a925 (patch)
treec33aa8ccee82b26d868fbc91abed94e2480864c2 /methods.py
parent243bdc4524ddcf8ac6bef03c378e14fe7bb263b8 (diff)
downloadredot-engine-3a2ca68af3c8bafe9f60f09bd8fece894fe3a925.tar.gz
SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
Diffstat (limited to 'methods.py')
-rw-r--r--methods.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/methods.py b/methods.py
index 00c477635e..3add9b1f18 100644
--- a/methods.py
+++ b/methods.py
@@ -19,6 +19,14 @@ 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:
+ self.Append(CCFLAGS=['/w'])
+ else:
+ self.Append(CCFLAGS=['-w'])
+
+
def add_module_version_string(self,s):
self.module_version_string += "." + s