diff options
| author | Arthur LAURENT <[email protected]> | 2022-11-30 18:31:43 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2022-11-30 18:31:43 +0100 |
| commit | eb78bb8a58ed6f2f4b737c2cf5905538e076824d (patch) | |
| tree | eb6fd74229cd06e6055a7c8bb9ab0366ddb1a277 /xmake/rules/c++/modules/modules_support/msvc.lua | |
| parent | 6bcfad861ab7c499681e3a48ecdfd9262ef3d683 (diff) | |
preprocess msvc
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/msvc.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/msvc.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index 8048b7041..8138d6af1 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -141,7 +141,11 @@ function generate_dependencies(target, sourcebatch, opt) local flags = {jsonfile, sourcefile, "-Fo" .. target:objectfile(sourcefile)} os.vrunv(compinst:program(), table.join(compinst:compflags({target = target}), common_flags, flags), {envs = vcvars}) else - common.fallback_generate_dependencies(target, jsonfile, sourcefile) + common.fallback_generate_dependencies(target, jsonfile, sourcefile, function(file) + local ifile = path.translate(path.join(outputdir, path.filename(file) .. ".i")) + os.vrunv(compinst:program(), table.join(compinst:compflags({target = target}), {"/TP", "/P", file, "/Fi" .. ifile})) + return io.readfile(ifile) + end) end changed = true |
