diff options
| author | ruki <[email protected]> | 2025-04-12 00:50:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-12 00:50:49 +0800 |
| commit | b9cb224619b0c886020559ce605be351fb149c7e (patch) | |
| tree | 0feb9ad973d100a40b5a3d120eeab6ecc90ee9dd /xmake/plugins/project/vstudio/impl | |
| parent | 2d350252b5413a1e3379d4ed88968a984b59c57d (diff) | |
improve vs201x
Diffstat (limited to 'xmake/plugins/project/vstudio/impl')
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua index b69826694..9b0846930 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua @@ -30,6 +30,7 @@ import("detect.sdks.find_cuda") import("vsfile") import("vsutils") import("private.utils.toolchain", {alias = "toolchain_utils"}) +import("rules.c++.modules.modules_support.compiler_support", {rootdir = os.programdir()}) function _make_dirs(dir, vcxprojdir) dir = dir:trim() @@ -132,12 +133,6 @@ function _split_gpucodes(flag) return flag:split(",") end --- is module file? -function _is_modulefile(sourcefile) - local extension = path.extension(sourcefile) - return extension == ".mpp" or extension == ".mxx" or extension == ".cppm" or extension == ".ixx" -end - -- make compiling command function _make_compcmd(compargv, sourcefile, objectfile, vcxprojdir) local argv = {} @@ -1179,7 +1174,7 @@ function _make_source_file_forall(vcxprojfile, vsinfo, target, sourcefile, sourc else -- compile as c++ modules - if _is_modulefile(sourcefile) then + if compiler_support.has_module_extension(sourcefile) then vcxprojfile:print("<CompileAs>CompileAsCppModule</CompileAs>") end @@ -1316,7 +1311,7 @@ function _make_source_file_forspec(vcxprojfile, vsinfo, target, sourcefile, sour -- for *.c/cpp/cu files else -- compile as c++ modules - if _is_modulefile(sourcefile) then + if compiler_support.has_module_extension(sourcefile) then vcxprojfile:print("<CompileAs>CompileAsCppModule</CompileAs>") end |
