aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-02 23:13:53 +0200
committerDavid Robillard <d@drobilla.net>2020-07-02 23:13:53 +0200
commit9483e34037463b083d3e7f437eec6f72c8173996 (patch)
tree99e6f3e0cedbef77db270ac4e695a81e4e7307e5
parentf53cdd7792ad0b0dc7b98653811f820065e87a31 (diff)
Fix werror with clang and deprecation warnings on Mac
-rw-r--r--wscript12
1 files changed, 7 insertions, 5 deletions
diff --git a/wscript b/wscript
index 766a56a..f3b0361 100644
--- a/wscript
+++ b/wscript
@@ -74,14 +74,12 @@ def configure(conf):
if conf.env.TARGET_PLATFORM == "win32":
append_cflags(['-Wno-cast-function-type'])
- if conf.env.TARGET_PLATFORM == 'darwin':
- append_cflags(['-DGL_SILENCE_DEPRECATION',
- '-Wno-deprecated-declarations'])
-
if Options.options.ultra_strict and 'clang' in conf.env.CC[0]:
for var in ['CFLAGS', 'CXXFLAGS']:
flags = conf.env[var]
- conf.env[var] = [f for f in flags if not f.startswith('-W')]
+ conf.env[var] = [f for f in flags
+ if not (f.startswith('-W') and f != '-Werror')]
+
conf.env.append_value(var, [
'-Weverything',
'-Wno-bad-function-cast',
@@ -100,6 +98,10 @@ def configure(conf):
'-Wno-old-style-cast',
])
+ if conf.env.TARGET_PLATFORM == 'darwin':
+ append_cflags(['-DGL_SILENCE_DEPRECATION',
+ '-Wno-deprecated-declarations'])
+
conf.check_cc(lib='m', uselib_store='M', mandatory=False)
conf.check_cc(lib='dl', uselib_store='DL', mandatory=False)