From ed581b12005d60120381c9d3a6da63ea70eb769d Mon Sep 17 00:00:00 2001 From: Shiwei Wang <4977975+wsw0108@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:26:30 +0800 Subject: pass opt to tools/msbuild in tools/cmake make `cmake.install(package, configs, { jobs = 1})` works as expected --- xmake/modules/package/tools/cmake.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 8ee305a99..2528ec25b 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -1007,7 +1007,7 @@ end function _build_for_msvc(package, configs, opt) local allbuild = os.isfile("ALL_BUILD.vcxproj") and "ALL_BUILD.vcxproj" or "ALL_BUILD.vcproj" assert(os.isfile(allbuild), "ALL_BUILD project not found!") - msbuild.build(package, {allbuild, "-t:Rebuild"}) + msbuild.build(package, {allbuild, "-t:Rebuild"}, opt) end -- do build for make @@ -1080,10 +1080,10 @@ end function _install_for_msvc(package, configs, opt) local allbuild = os.isfile("ALL_BUILD.vcxproj") and "ALL_BUILD.vcxproj" or "ALL_BUILD.vcproj" assert(os.isfile(allbuild), "ALL_BUILD project not found!") - msbuild.build(package, {allbuild, "-t:Rebuild", "/nr:false"}) + msbuild.build(package, {allbuild, "-t:Rebuild", "/nr:false"}, opt) local projfile = os.isfile("INSTALL.vcxproj") and "INSTALL.vcxproj" or "INSTALL.vcproj" if os.isfile(projfile) then - msbuild.build(package, {projfile}) + msbuild.build(package, {projfile}, opt) os.trycp("install/bin", package:installdir()) os.trycp("install/lib", package:installdir()) -- perhaps only headers library os.trycp("install/share", package:installdir()) -- cgit v1.3.1