diff options
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/common.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/common.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua index 45a1cac2f..b21613f61 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -446,10 +446,10 @@ function fallback_generate_dependencies(target, jsonfile, sourcefile, preprocess sourcecode = sourcecode:gsub("/%*.-%*/", "") for _, line in ipairs(sourcecode:split("\n", {plain = true})) do if not module_name_export then - module_name_export = line:match("export%s+module%s+(.+)%s*;") + module_name_export = line:match("export%s+module%s+(.+)%s*;") or line:match("export%s+__preprocessed_module%s+(.+)%s*;") end if not module_name_private then - module_name_private = line:match("module%s+(.+)%s*;") + module_name_private = line:match("module%s+(.+)%s*;") or line:match("__preprocessed_module%s+(.+)%s*;") end local module_depname = line:match("import%s+(.+)%s*;") -- we need parse module interface dep in cxx/impl_unit.cpp, e.g. hello.mpp and hello_impl.cpp @@ -487,6 +487,7 @@ function fallback_generate_dependencies(target, jsonfile, sourcefile, preprocess local provide = {} provide["logical-name"] = module_name_export provide["source-path"] = path.absolute(sourcefile, project.directory()) + provide["is-interface"] = true rule.provides = {} table.insert(rule.provides, provide) |
