summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-03 00:51:23 +0800
committerruki <[email protected]>2023-02-03 00:51:23 +0800
commitb005057d44cf03a29613d7d1881517e59acacae1 (patch)
tree61af7f46fe18bcc1d01e24bc317283aa65ba9098
parent743399e488b2371511235bde557daeeedcd653ce (diff)
improve tips
-rw-r--r--xmake/core/project/target.lua8
-rw-r--r--xmake/rules/utils/check_targets/check_targets.lua4
2 files changed, 6 insertions, 6 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 04227ab4b..6fc0efd3c 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -1384,8 +1384,8 @@ function _instance:fileconfig(sourcefile)
-- match source files
local results = os.match(filepath)
if #results == 0 and not fileconfig.always_added then
- local sourceinfo = (self:get("__sourceinfo_files") or {})[filepath] or {}
- utils.warning("cannot match %s(%s).add_files(\"%s\") at %s:%d", self:type(), self:name(), filepath, sourceinfo.file or "", sourceinfo.line or -1)
+ local sourceinfo = self:sourceinfo("files", filepath) or {}
+ utils.warning("%s:%d: cannot match add_files(\"%s\") in %s(%s)", sourceinfo.file or "", sourceinfo.line or -1, filepath, self:type(), self:name())
end
-- process source files
@@ -1508,8 +1508,8 @@ function _instance:sourcefiles()
targetcache:set2("sourcefiles", file, results)
end
if #results == 0 then
- local sourceinfo = (self:get("__sourceinfo_files") or {})[file] or {}
- utils.warning("cannot match %s(%s).%s_files(\"%s\") at %s:%d", self:type(), self:name(), (removed and "remove" or "add"), file, sourceinfo.file or "", sourceinfo.line or -1)
+ local sourceinfo = self:sourceinfo("files", file) or {}
+ utils.warning("%s:%d: cannot match %s_files(\"%s\") in %s(%s)", sourceinfo.file or "", sourceinfo.line or -1, (removed and "remove" or "add"), file, self:type(), self:name())
end
-- process source files
diff --git a/xmake/rules/utils/check_targets/check_targets.lua b/xmake/rules/utils/check_targets/check_targets.lua
index 17610a29e..a5073cfa0 100644
--- a/xmake/rules/utils/check_targets/check_targets.lua
+++ b/xmake/rules/utils/check_targets/check_targets.lua
@@ -31,8 +31,8 @@ function main(target)
for _, name in ipairs({"includedirs", "frameworkdirs", "linkdirs"}) do
for _, value in ipairs(_get_values_from_target(target, name)) do
if not os.isdir(value) then
- local sourceinfo = (target:get("__sourceinfo_" .. name) or {})[value] or {}
- wprint("%s(%s).add_%s(\"%s\") path not found at %s:%d", target:type(), target:name(), name, value, sourceinfo.file or "", sourceinfo.line or -1)
+ local sourceinfo = target:sourceinfo(name, value) or {}
+ wprint("%s:%d: %s '%s' not found in %s(%s)", sourceinfo.file or "", sourceinfo.line or -1, name, value, target:type(), target:name())
end
end
end