From af060cd47c0673ef415769b36222f42b37a4a146 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 8 Jun 2015 15:05:57 +0800 Subject: add undefines for project --- xmake/scripts/base/compiler.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'xmake/scripts/base/compiler.lua') 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))) -- cgit v1.3.1