diff options
| author | ruki <[email protected]> | 2022-10-14 21:01:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-14 21:01:09 +0800 |
| commit | 455d516884ff4d69b47d967c63b89281319612c9 (patch) | |
| tree | dbd5ca118517076c3f4af8fb5b6b4558118ea895 | |
| parent | 34ee1de74fbd88bb92fa4aa7d399ab2b657f9d17 (diff) | |
add include warnings
| -rw-r--r-- | xmake/core/base/interpreter.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua index bd1a69c95..aa33c6ce6 100644 --- a/xmake/core/base/interpreter.lua +++ b/xmake/core/base/interpreter.lua @@ -1608,16 +1608,22 @@ function interpreter:api_builtin_includes(...) local subpaths_matched = {} for _, subpath in ipairs(subpaths) do -- find the given files from the project directory + local found = false local files = os.match(subpath, not subpath:endswith(".lua")) if files and #files > 0 then table.join2(subpaths_matched, files) + found = true elseif not path.is_absolute(subpath) then -- attempt to find files from programdir/includes/*.lua files = os.files(path.join(os.programdir(), "includes", subpath)) if files and #files > 0 then table.join2(subpaths_matched, files) + found = true end end + if not found then + utils.warning("includes(\"%s\") cannot find any files!", subpath) + end end -- includes all files |
