diff options
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/msvc.lua | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index 32cdc4d4f..1254aa29a 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -711,6 +711,8 @@ function build_modules_for_batchcmds(target, batchcmds, objectfiles, modules, op _batchcmds_compile(batchcmds, target, table.join(flags, {"-x", "c++-module", "--precompile", "-c", path(cppfile), "-o", path(provide.bmi)})) _add_module_to_mapper(target, name, provide.bmi, {namedmodule = true}) + -- add requiresflags to module. it will be used for project generation + target:fileconfig_add(cppfile, {force = {cxxflags = requiresflags}}) end _batchcmds_compile(batchcmds, target, file, table.join(flags, not provide and {"-x", "c++"} or {}, {"-c", file, "-o", path(objectfile)})) diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index 0643117d0..e90ae3df3 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -557,6 +557,8 @@ function build_modules_for_batchcmds(target, batchcmds, objectfiles, modules, op _add_objectfile_to_link_arguments(target, path.translate(objectfile)) if provide then _add_module_to_mapper(target, referenceflag, name, name, objectfile, provide.bmi, requiresflags) + -- add requiresflags to module. it will be used for project generation + target:fileconfig_add(cppfile, {force = {cxxflags = requiresflags}}) end depmtime = math.max(depmtime, os.mtime(provide and provide.bmi or objectfile)) elseif requiresflags then |
