diff options
| author | ruki <[email protected]> | 2018-05-08 22:52:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-05-08 11:16:55 +0800 |
| commit | b5333b27b79f7cabbdc8d75356b2de118f9ea744 (patch) | |
| tree | f4cb719e259ae64b6a48ab35a425eb0db76cd3ab /xmake/modules/core/project/depend.lua | |
| parent | c61545b0275b64c8b0294ce69e635e30475a2239 (diff) | |
improve build deps
Diffstat (limited to 'xmake/modules/core/project/depend.lua')
| -rw-r--r-- | xmake/modules/core/project/depend.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xmake/modules/core/project/depend.lua b/xmake/modules/core/project/depend.lua index cbb3d1bd8..277601506 100644 --- a/xmake/modules/core/project/depend.lua +++ b/xmake/modules/core/project/depend.lua @@ -40,10 +40,17 @@ end -- function is_changed(dependinfo, opt) + -- empty depend info? always be changed + local files = dependinfo.files or {} + local values = dependinfo.values or {} + if #files == 0 and #values == 0 then + return true + end + -- check the dependent files are changed? local lastmtime = nil _g.file_results = _g.file_results or {} - for _, file in ipairs(dependinfo.files) do + for _, file in ipairs(files) do -- optimization: this file has been not checked? local status = _g.file_results[file] @@ -70,7 +77,7 @@ function is_changed(dependinfo, opt) end -- check the dependent values are changed? - local depvalues = dependinfo.values or {} + local depvalues = values local optvalues = opt.values or {} if #depvalues ~= #optvalues then return true |
