diff options
| author | ruki <[email protected]> | 2022-08-06 00:10:00 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-08-06 00:10:06 +0800 |
| commit | b0379bcadce0b66fa5d3e5fc45d85a8ba365c92b (patch) | |
| tree | 725da3c3598435f6376af32b018f5628e4d504b3 /xmake/rules/c++/modules/modules_support/msvc.lua | |
| parent | 53c31dfffd73cd635a6512d49b902e8c45dca102 (diff) | |
cache module deps
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/msvc.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/msvc.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index 109c68751..e261332c0 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -86,6 +86,7 @@ function generate_dependencies(target, sourcebatch, opt) local scandependenciesflag = get_scandependenciesflag(target) local common_args = {"/TP", scandependenciesflag} local cachedir = common.modules_cachedir(target) + local changed = false for _, sourcefile in ipairs(sourcebatch.sourcefiles) do local dependfile = target:dependfile(sourcefile) depend.on_changed(function () @@ -104,11 +105,13 @@ function generate_dependencies(target, sourcebatch, opt) else common.fallback_generate_dependencies(target, jsonfile, sourcefile) end + changed = true local dependinfo = io.readfile(jsonfile) return { moduleinfo = dependinfo } end, {dependfile = dependfile, files = {sourcefile}}) end + return changed end -- generate target stl header units for batchcmds |
