diff options
| author | 白喵 <[email protected]> | 2024-07-21 18:53:15 +0800 |
|---|---|---|
| committer | 白喵 <[email protected]> | 2024-07-21 18:53:15 +0800 |
| commit | ef289c5915fd1f8d770333126e0bea39ed504177 (patch) | |
| tree | 70324a8d95ce850db5085369aa92b61b61c28cd3 | |
| parent | 2412ed94e70b00b0c2f3bd8c4553828efd458b1b (diff) | |
add policy msbuild.multi_tool_task
| -rw-r--r-- | xmake/core/project/policy.lua | 2 | ||||
| -rw-r--r-- | xmake/toolchains/msvc/load.lua | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/xmake/core/project/policy.lua b/xmake/core/project/policy.lua index 4b5ef9dae..8735a6921 100644 --- a/xmake/core/project/policy.lua +++ b/xmake/core/project/policy.lua @@ -88,6 +88,8 @@ function policy.policies() ["build.c++.gcc.modules.cxx11abi"] = {description = "Force to enable new cxx11 abi in C++ modules for gcc.", type = "boolean"}, -- Enable cuda device link ["build.cuda.devlink"] = {description = "Enable Cuda devlink.", type = "boolean"}, + -- Enable msbuild MultiToolTask + ["msbuild.multi_tool_task"] = {description = "Enable msbuild MultiToolTask.", type = "boolean"}, -- Enable windows UAC and set level, e.g. invoker, admin, highest ["windows.manifest.uac"] = {description = "Enable windows manifest UAC.", type = "string"}, -- Enable ui access for windows UAC diff --git a/xmake/toolchains/msvc/load.lua b/xmake/toolchains/msvc/load.lua index c5f2f6dac..a12d894e8 100644 --- a/xmake/toolchains/msvc/load.lua +++ b/xmake/toolchains/msvc/load.lua @@ -21,6 +21,7 @@ -- imports import("core.base.option") import("core.base.semver") +import("core.project.project") import("core.project.config") import("detect.sdks.find_vstudio") @@ -90,5 +91,10 @@ function main(toolchain) if vs and semver.is_valid(vs) and semver.compare(vs, "2005") < 0 then toolchain:add("runenvs", "VS_BINARY_OUTPUT", "1") end + + -- enable msbuild mtt + if project.policy("msbuild.multi_tool_task") then + toolchain:add("runenvs", "UseMultiToolTask", "true") + end end |
