summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support
diff options
context:
space:
mode:
authorruki <[email protected]>2022-08-05 00:38:05 +0800
committerruki <[email protected]>2022-08-05 00:38:05 +0800
commitb8c3621afb10f6dd7ee483ed8bebfb039cd11d7e (patch)
tree9ebd27fcb23e9a39a856e832495ea673f7354e60 /xmake/rules/c++/modules/modules_support
parenta230a29949612a49fb9acb06988518e0d84ecfe1 (diff)
add more comments
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
-rw-r--r--xmake/rules/c++/modules/modules_support/common.lua27
-rw-r--r--xmake/rules/c++/modules/modules_support/msvc.lua1
2 files changed, 27 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua
index 11f7bf897..00f7ae6f3 100644
--- a/xmake/rules/c++/modules/modules_support/common.lua
+++ b/xmake/rules/c++/modules/modules_support/common.lua
@@ -128,6 +128,33 @@ function load_moduleinfos(target, sourcebatch, opt)
end
-- parse module dependency data
+--[[
+{
+ "build/.objs/stl_headerunit/linux/x86_64/release/src/hello.mpp.o" = {
+ requires = {
+ iostream = {
+ method = "include-angle",
+ unique = true,
+ path = "/usr/include/c++/11/iostream"
+ }
+ },
+ provides = {
+ hello = {
+ bmi = "build/.gens/stl_headerunit/linux/x86_64/release/rules/modules/cache/hello.gcm",
+ sourcefile = "src/hello.mpp"
+ }
+ }
+ },
+ "build/.objs/stl_headerunit/linux/x86_64/release/src/main.cpp.o" = {
+ requires = {
+ hello = {
+ method = "by-name",
+ unique = false,
+ path = "build/.gens/stl_headerunit/linux/x86_64/release/rules/modules/cache/hello.gcm"
+ }
+ }
+ }
+}]]
function parse_dependency_data(target, moduleinfos, opt)
local modules
local cachedir = modules_cachedir(target)
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua
index b7045fc73..63e445df9 100644
--- a/xmake/rules/c++/modules/modules_support/msvc.lua
+++ b/xmake/rules/c++/modules/modules_support/msvc.lua
@@ -99,7 +99,6 @@ function generate_dependencies(target, sourcebatch, opt)
if scandependenciesflag then
local args = {jsonfile, sourcefile, "/Fo" .. target:objectfile(sourcefile)}
os.vrunv(compinst:program(), table.join(compinst:compflags({target = target}), common_args, args), {envs = vcvars})
- io.cat(jsonfile)
else
common.fallback_generate_dependencies(target, jsonfile, sourcefile)
end