diff options
| author | ruki <[email protected]> | 2015-06-08 15:05:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-08 15:05:57 +0800 |
| commit | af060cd47c0673ef415769b36222f42b37a4a146 (patch) | |
| tree | cbb4e7d0e0e0e96739d403b12493c43314234306 /xmake/scripts/base/compiler.lua | |
| parent | d3258129a4a1ba9886b7e8d773ba8e4ec956b4a6 (diff) | |
add undefines for project
Diffstat (limited to 'xmake/scripts/base/compiler.lua')
| -rw-r--r-- | xmake/scripts/base/compiler.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua index 880139e1f..685d8dc66 100644 --- a/xmake/scripts/base/compiler.lua +++ b/xmake/scripts/base/compiler.lua @@ -233,7 +233,7 @@ function compiler.make(module, target, srcfile, objfile) -- append the includedirs flags from the current project - if module._make_includedir then + if module.flag_includedir then local includedirs = utils.wrap(target.includedirs) for _, includedir in ipairs(includedirs) do table.join2(flags, module.flag_includedir(includedir)) @@ -241,13 +241,21 @@ function compiler.make(module, target, srcfile, objfile) end -- append the defines flags from the current project - if module._make_define then + if module.flag_define then local defines = utils.wrap(target.defines) for _, define in ipairs(defines) do table.join2(flags, module.flag_define(define)) end end + -- append the undefines flags from the current project + if module.flag_undefine then + local undefines = utils.wrap(target.undefines) + for _, undefine in ipairs(undefines) do + table.join2(flags, module.flag_undefine(undefine)) + end + end + -- append the flags from the configure for _, flag_name in ipairs(flag_names) do table.join2(flags, compiler._mapflags(module, config.get(flag_name))) |
