summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2024-02-07 16:56:02 +0100
committerArthur LAURENT <[email protected]>2024-02-07 18:04:29 +0100
commit6e3d6c4cf7166e093ba77fac1d221ff6daef1792 (patch)
tree1f6f4164c145d0ab90641af56aa1d4350ac46f70 /xmake/rules/c++/modules/modules_support
parent6f520cf8320ddb4424560b9094fb74844dd8e40b (diff)
update vs project generator to support moduleonly target kind
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
-rw-r--r--xmake/rules/c++/modules/modules_support/dependency_scanner.lua1
-rw-r--r--xmake/rules/c++/modules/modules_support/msvc/builder.lua6
2 files changed, 4 insertions, 3 deletions
diff --git a/xmake/rules/c++/modules/modules_support/dependency_scanner.lua b/xmake/rules/c++/modules/modules_support/dependency_scanner.lua
index 0b02292ef..1dc55bcb8 100644
--- a/xmake/rules/c++/modules/modules_support/dependency_scanner.lua
+++ b/xmake/rules/c++/modules/modules_support/dependency_scanner.lua
@@ -224,6 +224,7 @@ function _generate_dependencies(target, sourcebatch, opt)
end
-- get module dependencies
function get_module_dependencies(target, sourcebatch, opt)
+ print(sourcebatch)
local cachekey = target:name() .. "/" .. sourcebatch.rulename
local modules = compiler_support.memcache():get2("modules", cachekey)
if modules == nil or opt.regenerate then
diff --git a/xmake/rules/c++/modules/modules_support/msvc/builder.lua b/xmake/rules/c++/modules/modules_support/msvc/builder.lua
index fad853577..015e04db5 100644
--- a/xmake/rules/c++/modules/modules_support/msvc/builder.lua
+++ b/xmake/rules/c++/modules/modules_support/msvc/builder.lua
@@ -41,7 +41,7 @@ function _make_modulebuildflags(target, provide, bmifile, opt)
local flags
if provide then -- named module
- flags = table.join({"-TP", ifcoutputflag, bmifile, provide.interface and interfaceflag or internalpartitionflag}, ifconly or {})
+ flags = table.join({"-TP", ifcoutputflag, path(bmifile), provide.interface and interfaceflag or internalpartitionflag}, ifconly or {})
else
flags = {"-TP"}
end
@@ -102,8 +102,8 @@ function _batchcmds_compile(batchcmds, target, flags, sourcefile, outputfile)
opt = opt or {}
local compinst = target:compiler("cxx")
local compflags = compinst:compflags({sourcefile = sourcefile, target = target})
- flags = table.join("-c", compflags or {}, flags, {"/Fo", outputfile, sourcefile})
- batchcmds:compilev(flags, {compiler = compinst, sourcekind = "cxx"})
+ flags = table.join(compflags or {}, flags)
+ batchcmds:compile(sourcefile, outputfile, {sourcekind = "cxx", compflags = flags})
end
-- get module requires flags