diff options
| author | ruki <[email protected]> | 2020-02-20 22:40:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-02-20 10:00:41 +0800 |
| commit | c09a825d5c499f71a4fcb5774905a58e9647e4c5 (patch) | |
| tree | 11a52bb3119bc0b2fd84cd0f85b86f87f611930d | |
| parent | cddd02bfe9ab6d77026134303baf41056862021a (diff) | |
improve msbuild
| -rw-r--r-- | xmake/modules/private/action/trybuild/msbuild.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/modules/private/action/trybuild/msbuild.lua b/xmake/modules/private/action/trybuild/msbuild.lua index 93a01ce78..f66676c26 100644 --- a/xmake/modules/private/action/trybuild/msbuild.lua +++ b/xmake/modules/private/action/trybuild/msbuild.lua @@ -31,11 +31,18 @@ end -- do clean function clean() + local configfile = find_file("*.sln", os.curdir()) + if configfile then + os.exec("msbuild \"%s\" -nologo -t:Clean -p:Configuration=Release -p:Platform=%s", configfile, is_arch("x64") and "x64" or "Win32") + end end -- do build function build() - os.exec("msbuild \"%s\" -nologo -t:Rebuild -p:Configuration=Release -p:Platform=%s", buildfile, os.arch() == "x64" and "x64" or "Win32") + local configfile = find_file("*.sln", os.curdir()) + if configfile then + os.exec("msbuild \"%s\" -nologo -t:Build -p:Configuration=Release -p:Platform=%s", configfile, is_arch("x64") and "x64" or "Win32") + end cprint("${bright}build ok!") end |
