diff options
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/msvc.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/msvc.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index 0372ca997..0643117d0 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -100,7 +100,7 @@ function _build_modulefile(target, sourcefile, opt) local dependfile = opt.dependfile local compinst = compiler.load("cxx", {target = target}) local compflags = compinst:compflags({sourcefile = sourcefile, target = target}) - local dependinfo = option.get("rebuild") and {} or (depend.load(dependfile) or {}) + local dependinfo = target:is_rebuilt() and {} or (depend.load(dependfile) or {}) -- need build this object? local dryrun = option.get("dry-run") @@ -216,7 +216,7 @@ function generate_dependencies(target, sourcebatch, opt) local dependinfo = io.readfile(jsonfile) return { moduleinfo = dependinfo } - end, {dependfile = dependfile, files = {sourcefile}}) + end, {dependfile = dependfile, files = {sourcefile}, changed = target:is_rebuilt()}) end return changed end @@ -274,7 +274,7 @@ function generate_stl_headerunits_for_batchjobs(target, batchjobs, headerunits, } generate_headerunit_for_batchjob(target, headerunit.name, flags, objectfile, index, total) - end, {dependfile = target:dependfile(bmifile), files = {headerunit.path}}) + end, {dependfile = target:dependfile(bmifile), files = {headerunit.path}, changed = target:is_rebuilt()}) _add_module_to_mapper(target, headerunitflag .. ":angle", headerunit.name, headerunit.name, objectfile, bmifile) end, {rootjob = flushjob}) end @@ -351,7 +351,7 @@ function generate_user_headerunits_for_batchjobs(target, batchjobs, headerunits, "/Fo" .. objectfile } generate_headerunit_for_batchjob(target, headerunit.name, flags, objectfile, index, total) - end, {dependfile = target:dependfile(bmifile), files = {headerunit.path}}) + end, {dependfile = target:dependfile(bmifile), files = {headerunit.path}, changed = target:is_rebuilt()}) _add_module_to_mapper(target, headerunitflag, headerunit.name, headerunit.path, objectfile, bmifile) end, {rootjob = flushjob}) end @@ -454,7 +454,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op progress.show((index * 100) / total, "${color.build.object}generating.module.metadata %s", name) local metadata = common.generate_meta_module_info(target, name, cppfile, module.requires) json.savefile(metafilepath, metadata) - end, {dependfile = target:dependfile(metafilepath), files = {cppfile}}) + end, {dependfile = target:dependfile(metafilepath), files = {cppfile}, changed = target:is_rebuilt()}) end, {rootjob = flushjob}) end end |
