summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-02-06 23:20:10 +0800
committerruki <[email protected]>2018-02-06 14:01:00 +0800
commit315793c730d58662ae98375552d2c817c83f77c5 (patch)
treefdc8e86dd7f0b11c08ff4ac2b9741efd40166998
parent698f2dc400aea41f40a9eccc52b7fdc9db856884 (diff)
fix source info bug
-rw-r--r--xmake/core/project/target.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index dc8f68bae..e5dd28f33 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -434,7 +434,7 @@ function target:fileconfig(sourcefile)
-- match source files
local results = os.match(filepath)
if #results == 0 then
- local sourceinfo = (self:get("__sourceinfo_files") or {})[filepath]
+ local sourceinfo = (self:get("__sourceinfo_files") or {})[filepath] or {}
utils.warning("cannot match add_files(\"%s\") at %s:%d", filepath, sourceinfo.file or "", sourceinfo.line or -1)
end
@@ -512,7 +512,7 @@ function target:sourcefiles()
-- match source files
local results = os.match(file)
if #results == 0 then
- local sourceinfo = (self:get("__sourceinfo_files") or {})[file]
+ local sourceinfo = (self:get("__sourceinfo_files") or {})[file] or {}
utils.warning("cannot match %s_files(\"%s\") at %s:%d", utils.ifelse(deleted, "del", "add"), file, sourceinfo.file or "", sourceinfo.line or -1)
end