diff options
| author | ruki <[email protected]> | 2020-11-14 21:47:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-14 21:47:13 +0800 |
| commit | 8a223cf58575a311ac62ad24b00e925429ad5f44 (patch) | |
| tree | 7822ce49e3c2f8910e7472b3426606ff4f441801 | |
| parent | e8dae90dac349d00b9693057454a643d31edabd6 (diff) | |
improve cmake/build
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/private/action/trybuild/cmake.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 88f0df71b..bf335bb94 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -279,7 +279,7 @@ function _build_for_msvc(package, configs, opt) local slnfile = assert(find_file("*.sln", os.curdir()), "*.sln file not found!") local runenvs = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()}):runenvs() local msbuild = find_tool("msbuild", {envs = runenvs}) - os.vrunv(msbuild.program, {slnfile, "-nologo", "-t:Rebuild", "-p:Configuration=" .. (package:debug() and "Debug" or "Release"), "-p:Platform=" .. (package:is_arch("x64") and "x64" or "Win32")}, {envs = runenvs}) + os.vrunv(msbuild.program, {slnfile, "-nologo", "-t:Rebuild", "-m", "-p:Configuration=" .. (package:debug() and "Debug" or "Release"), "-p:Platform=" .. (package:is_arch("x64") and "x64" or "Win32")}, {envs = runenvs}) end -- do build for make @@ -323,7 +323,7 @@ function _install_for_msvc(package, configs, opt) local slnfile = assert(find_file("*.sln", os.curdir()), "*.sln file not found!") local runenvs = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()}):runenvs() local msbuild = find_tool("msbuild", {envs = runenvs}) - os.vrunv(msbuild.program, {slnfile, "-nologo", "-t:Rebuild", "-p:Configuration=" .. (package:debug() and "Debug" or "Release"), "-p:Platform=" .. (package:is_arch("x64") and "x64" or "Win32")}, {envs = runenvs}) + os.vrunv(msbuild.program, {slnfile, "-nologo", "-t:Rebuild", "-m", "-p:Configuration=" .. (package:debug() and "Debug" or "Release"), "-p:Platform=" .. (package:is_arch("x64") and "x64" or "Win32")}, {envs = runenvs}) local projfile = os.isfile("INSTALL.vcxproj") and "INSTALL.vcxproj" or "INSTALL.vcproj" if os.isfile(projfile) then os.vrunv(msbuild.program, {projfile, "/property:configuration=" .. (package:debug() and "Debug" or "Release")}, {envs = runenvs}) diff --git a/xmake/modules/private/action/trybuild/cmake.lua b/xmake/modules/private/action/trybuild/cmake.lua index 3af44ef51..445c2e9c4 100644 --- a/xmake/modules/private/action/trybuild/cmake.lua +++ b/xmake/modules/private/action/trybuild/cmake.lua @@ -255,7 +255,7 @@ function build() local runenvs = toolchain.load("msvc"):runenvs() local msbuild = find_tool("msbuild", {envs = runenvs}) local slnfile = assert(find_file("*.sln", os.curdir()), "*.sln file not found!") - os.vexecv(msbuild.program, {slnfile, "-nologo", "-t:Build", "-p:Configuration=" .. (is_mode("debug") and "Debug" or "Release"), "-p:Platform=" .. (is_arch("x64") and "x64" or "Win32")}, {envs = runenvs}) + os.vexecv(msbuild.program, {slnfile, "-nologo", "-t:Build", "-m", "-p:Configuration=" .. (is_mode("debug") and "Debug" or "Release"), "-p:Platform=" .. (is_arch("x64") and "x64" or "Win32")}, {envs = runenvs}) local projfile = os.isfile("INSTALL.vcxproj") and "INSTALL.vcxproj" or "INSTALL.vcproj" if os.isfile(projfile) then os.vexecv(msbuild.program, {projfile, "/property:configuration=" .. (is_mode("debug") and "Debug" or "Release")}, {envs = runenvs}) |
