From ffe0768bd867f90d482eeb7c12739e3a8fc00679 Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Sun, 4 Feb 2024 20:45:36 +0100 Subject: fix missing build variable declaration --- xmake/rules/c++/modules/modules_support/clang/builder.lua | 2 ++ xmake/rules/c++/modules/modules_support/msvc/builder.lua | 2 ++ 2 files changed, 4 insertions(+) diff --git a/xmake/rules/c++/modules/modules_support/clang/builder.lua b/xmake/rules/c++/modules/modules_support/clang/builder.lua index 0d470ada4..15a53c00b 100644 --- a/xmake/rules/c++/modules/modules_support/clang/builder.lua +++ b/xmake/rules/c++/modules/modules_support/clang/builder.lua @@ -205,6 +205,7 @@ function make_module_buildjobs(target, batchjobs, job_name, deps, opt) local compinst = compiler.load("cxx", {target = target}) local compflags = compinst:compflags({sourcefile = opt.cppfile, target = target}) + local build if provide or compiler_support.has_module_extension(opt.cppfile) then build = should_build(target, opt.cppfile, bmifile, {objectfile = opt.objectfile, requires = opt.module.requires}) @@ -268,6 +269,7 @@ function make_module_buildcmds(target, batchcmds, opt) local name, provide, _ = compiler_support.get_provided_module(opt.module) local bmifile = provide and compiler_support.get_bmi_path(provide.bmi) + local build if provide or compiler_support.has_module_extension(opt.cppfile) then build = should_build(target, opt.cppfile, bmifile, {objectfile = opt.objectfile, requires = opt.module.requires}) diff --git a/xmake/rules/c++/modules/modules_support/msvc/builder.lua b/xmake/rules/c++/modules/modules_support/msvc/builder.lua index 4aa353214..10a0ad409 100644 --- a/xmake/rules/c++/modules/modules_support/msvc/builder.lua +++ b/xmake/rules/c++/modules/modules_support/msvc/builder.lua @@ -222,6 +222,7 @@ function make_module_buildjobs(target, batchjobs, job_name, deps, opt) local compinst = compiler.load("cxx", {target = target}) local compflags = compinst:compflags({sourcefile = opt.cppfile, target = target}) + local build if provide or compiler_support.has_module_extension(opt.cppfile) then build = should_build(target, opt.cppfile, bmifile, {objectfile = opt.objectfile, requires = opt.module.requires}) @@ -280,6 +281,7 @@ function make_module_buildcmds(target, batchcmds, should_build, mark_build, opt) local name, provide, _ = compiler_support.get_provided_module(opt.module) local bmifile = provide and compiler_support.get_bmi_path(provide.bmi) + local build if provide or compiler_support.has_module_extension(opt.cppfile) then build = should_build(target, opt.cppfile, bmifile, {objectfile = opt.objectfile, requires = opt.module.requires}) -- cgit v1.3.1