summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/compiler.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-15 13:38:18 +0800
committerruki <[email protected]>2015-06-15 13:38:18 +0800
commit2ff2b14ec02d4d2ec77d26213412c1b82473bf8d (patch)
treedcf30572925e452e37d3f57371218913ea342105 /xmake/scripts/base/compiler.lua
parent7345d435c1c09f6a1d2ccd329174f99f150ec9b0 (diff)
add defines to config.h if ok
Diffstat (limited to 'xmake/scripts/base/compiler.lua')
-rw-r--r--xmake/scripts/base/compiler.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua
index 0b58533e2..da1d46d2f 100644
--- a/xmake/scripts/base/compiler.lua
+++ b/xmake/scripts/base/compiler.lua
@@ -314,16 +314,16 @@ function compiler._addflags_from_option(module, flags, flagnames, opt)
end
-- append the defines flags
- if opt.defines and module.flag_define then
- local defines = utils.wrap(opt.defines)
+ if opt.defines_if_ok and module.flag_define then
+ local defines = utils.wrap(opt.defines_if_ok)
for _, define in ipairs(defines) do
table.join2(flags, module:flag_define(define))
end
end
-- append the undefines flags
- if opt.undefines and module.flag_undefine then
- local undefines = utils.wrap(opt.undefines)
+ if opt.undefines_if_ok and module.flag_undefine then
+ local undefines = utils.wrap(opt.undefines_if_ok)
for _, undefine in ipairs(undefines) do
table.join2(flags, module:flag_undefine(undefine))
end