diff options
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/common.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/common.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua index 593913887..e91712ffd 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -376,7 +376,7 @@ end } ] }]] -function fallback_generate_dependencies(target, jsonfile, sourcefile) +function fallback_generate_dependencies(target, jsonfile, sourcefile, preprocess_file) local output = {version = 0, revision = 0, rules = {}} local rule = {outputs = {jsonfile}} rule["primary-output"] = target:objectfile(sourcefile) @@ -385,7 +385,7 @@ function fallback_generate_dependencies(target, jsonfile, sourcefile) local module_name_private local module_deps = {} local module_deps_set = hashset.new() - local sourcecode = io.readfile(sourcefile) + local sourcecode = preprocess_file(sourcefile) sourcecode = sourcecode:gsub("//.-\n", "\n") sourcecode = sourcecode:gsub("/%*.-%*/", "") for _, line in ipairs(sourcecode:split("\n", {plain = true})) do |
