diff options
| author | ruki <[email protected]> | 2018-10-26 22:47:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-10-26 10:42:49 +0800 |
| commit | bc3459d5969a9f8956c2387f04bd6519650532ad (patch) | |
| tree | 17c967c715c55669607db879a8edbbe05f034f60 /xmake/modules/core | |
| parent | fc38095c1ead23191a6911d448950e6f6ab6e00b (diff) | |
improve compilation dependences
Diffstat (limited to 'xmake/modules/core')
| -rw-r--r-- | xmake/modules/core/project/depend.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xmake/modules/core/project/depend.lua b/xmake/modules/core/project/depend.lua index 277601506..aa2dc7afa 100644 --- a/xmake/modules/core/project/depend.lua +++ b/xmake/modules/core/project/depend.lua @@ -60,7 +60,7 @@ function is_changed(dependinfo, opt) lastmtime = lastmtime or opt.lastmtime or 0 -- source and header files have been changed? - if os.mtime(file) > lastmtime then + if not os.isfile(file) or os.mtime(file) > lastmtime then -- mark this file as changed _g.file_results[file] = true @@ -98,4 +98,14 @@ function is_changed(dependinfo, opt) end end end + + -- check the dependent files list are changed? + local optfiles = opt.files + if optfiles then + for idx, file in ipairs(files) do + if file ~= optfiles[idx] then + return true + end + end + end end |
