projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c04346d
)
wscript: prepend defaults to honor user cflags
author
Paul Brossier
<piem@piem.org>
Sun, 25 Dec 2016 00:24:41 +0000
(
01:24
+0100)
committer
Paul Brossier
<piem@piem.org>
Sun, 25 Dec 2016 00:24:41 +0000
(
01:24
+0100)
wscript
patch
|
blob
|
history
diff --git
a/wscript
b/wscript
index
d8afc03
..
86517d6
100644
(file)
--- a/
wscript
+++ b/
wscript
@@
-137,11
+137,14
@@
def configure(ctx):
ctx.define('NDEBUG', 1)
if ctx.env.CC_NAME != 'msvc':
ctx.define('NDEBUG', 1)
if ctx.env.CC_NAME != 'msvc':
- # enable debug symbols and configure warnings
- ctx.env.CFLAGS += ['-g', '-Wall', '-Wextra']
if ctx.options.build_type == "debug":
# no optimization in debug mode
if ctx.options.build_type == "debug":
# no optimization in debug mode
- ctx.env.CFLAGS += ['-O0']
+ ctx.env.prepend_value('CFLAGS', ['-O0'])
+ else:
+ # default to -O2 in release mode
+ ctx.env.prepend_value('CFLAGS', ['-O2'])
+ # enable debug symbols and configure warnings
+ ctx.env.prepend_value('CFLAGS', ['-g', '-Wall', '-Wextra'])
else:
# enable debug symbols
ctx.env.CFLAGS += ['/Z7', '/FS']
else:
# enable debug symbols
ctx.env.CFLAGS += ['/Z7', '/FS']