From bc32dfdb2c91fc05b368a111a89505569117ccff Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 1 Sep 2023 00:45:55 +0800 Subject: revert on_changed --- xmake/rules/c++/modules/modules_support/clang.lua | 8 ++++---- xmake/rules/c++/modules/modules_support/gcc.lua | 8 ++++---- xmake/rules/c++/modules/modules_support/msvc.lua | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'xmake/rules/c++/modules/modules_support') diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index 02989928b..8cf54c883 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -332,7 +332,7 @@ function generate_dependencies(target, sourcebatch, opt) local changed = false for _, sourcefile in ipairs(sourcebatch.sourcefiles) do local dependfile = target:dependfile(sourcefile) - depend._on_changed(function() + depend.on_changed(function() if opt.progress then progress.show(opt.progress, "${color.build.object}generating.module.deps %s", sourcefile) end @@ -433,7 +433,7 @@ function generate_stl_headerunits_for_batchjobs(target, batchjobs, headerunits, local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension()) if not os.isfile(bmifile) then batchjobs:addjob(headerunit.name, function (index, total) - depend._on_changed(function() + depend.on_changed(function() -- don't build same header unit at the same time if not common.memcache():get2(headerunit.name, "building") then common.memcache():set2(headerunit.name, "building", true) @@ -505,7 +505,7 @@ function generate_user_headerunits_for_batchjobs(target, batchjobs, headerunits, local bmifilename = path.basename(objectfile) .. get_bmi_extension() local bmifile = path.join(outputdir, bmifilename) batchjobs:addjob(headerunit.name, function (index, total) - depend._on_changed(function() + depend.on_changed(function() progress.show((index * 100) / total, "${color.build.object}compiling.headerunit.$(mode) %s", headerunit.name) local objectdir = path.directory(objectfile) if not os.isdir(objectdir) then @@ -611,7 +611,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op if fileconfig and fileconfig.install then batchjobs:addjob(name .. "_metafile", function(index, total) local metafilepath = common.get_metafile(target, cppfile) - depend._on_changed(function() + depend.on_changed(function() progress.show(opt.progress, "${color.build.object}generating.module.metadata %s", name) local metadata = common.generate_meta_module_info(target, name, cppfile, module.requires) json.savefile(metafilepath, metadata) diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua index 784df5d7e..4fa92e4df 100644 --- a/xmake/rules/c++/modules/modules_support/gcc.lua +++ b/xmake/rules/c++/modules/modules_support/gcc.lua @@ -184,7 +184,7 @@ function generate_dependencies(target, sourcebatch, opt) local changed = false for _, sourcefile in ipairs(sourcebatch.sourcefiles) do local dependfile = target:dependfile(sourcefile) - depend._on_changed(function() + depend.on_changed(function() if opt.progress then progress.show(opt.progress, "${color.build.object}generating.module.deps %s", sourcefile) end @@ -237,7 +237,7 @@ function generate_stl_headerunits_for_batchjobs(target, batchjobs, headerunits, local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension()) if not os.isfile(bmifile) then batchjobs:addjob(headerunit.name, function (index, total) - depend._on_changed(function() + depend.on_changed(function() progress.show((index * 100) / total, "${color.build.object}compiling.headerunit.$(mode) %s", headerunit.name) local args = {"-c", "-x", "c++-system-header", headerunit.name} local flags = table.join(compinst:compflags({target = target}), args) @@ -305,7 +305,7 @@ function generate_user_headerunits_for_batchjobs(target, batchjobs, headerunits, local bmifilename = path.basename(objectfile) .. get_bmi_extension() local bmifile = path.join(outputdir, bmifilename) batchjobs:addjob(headerunit.name, function (index, total) - depend._on_changed(function() + depend.on_changed(function() progress.show((index * 100) / total, "${color.build.object}compiling.headerunit.$(mode) %s", headerunit.name) local objectdir = path.directory(objectfile) if not os.isdir(objectdir) then @@ -417,7 +417,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op if fileconfig and fileconfig.install then batchjobs:addjob(name .. "_metafile", function(index, total) local metafilepath = common.get_metafile(target, cppfile) - depend._on_changed(function() + depend.on_changed(function() 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) diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index 1cc881926..0643117d0 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -190,7 +190,7 @@ function generate_dependencies(target, sourcebatch, opt) local changed = false for _, sourcefile in ipairs(sourcebatch.sourcefiles) do local dependfile = target:dependfile(sourcefile) - depend._on_changed(function () + depend.on_changed(function () if opt.progress then progress.show(opt.progress, "${color.build.object}generating.module.deps %s", sourcefile) end @@ -263,7 +263,7 @@ function generate_stl_headerunits_for_batchjobs(target, batchjobs, headerunits, local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension()) local objectfile = bmifile .. ".obj" batchjobs:addjob(headerunit.name, function(index, total) - depend._on_changed(function() + depend.on_changed(function() local flags = { exportheaderflag, headernameflag .. ":angle", @@ -332,7 +332,7 @@ function generate_user_headerunits_for_batchjobs(target, batchjobs, headerunits, local bmifilename = path.basename(objectfile) .. get_bmi_extension() local bmifile = path.join(outputdir, bmifilename) batchjobs:addjob(headerunit.name, function (index, total) - depend._on_changed(function() + depend.on_changed(function() local objectdir = path.directory(objectfile) if not os.isdir(objectdir) then os.mkdir(objectdir) @@ -450,7 +450,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op if fileconfig and fileconfig.install then batchjobs:addjob(name .. "_metafile", function(index, total) local metafilepath = common.get_metafile(target, cppfile) - depend._on_changed(function() + depend.on_changed(function() 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) -- cgit v1.3.1