diff options
author | Jan Kotas <jkotas@microsoft.com> | 2015-08-19 21:12:40 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2015-08-20 20:27:39 -0700 |
commit | 9abdcfa31083750d09eb147811345b625575620e (patch) | |
tree | 035985c45017050d2ba348cd79dfc76a194a9a2a /build.cmd | |
parent | 65173556cac6152a8ba60109bfe8af30ed37f8bc (diff) | |
download | coreclr-9abdcfa31083750d09eb147811345b625575620e.tar.gz coreclr-9abdcfa31083750d09eb147811345b625575620e.tar.bz2 coreclr-9abdcfa31083750d09eb147811345b625575620e.zip |
Auto-detect VS2015
Change build and tests scripts to detect VS2015 and use that if available by default
Diffstat (limited to 'build.cmd')
-rw-r--r-- | build.cmd | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -6,9 +6,11 @@ set __BuildArch=x64 set __BuildType=Debug set __BuildOS=Windows_NT -:: Default to VS2013 -set __VSVersion=VS2013 -set __VSProductVersion=120 +:: Default to highest Visual Studio version available +set __VSVersion=vs2015 + +if defined VS120COMNTOOLS set __VSVersion=vs2013 +if defined VS140COMNTOOLS set __VSVersion=vs2015 :: Set the various build properties here so that CMake and MSBuild can pick them up set "__ProjectDir=%~dp0" @@ -39,8 +41,8 @@ if /i "%1" == "linuxmscorlib" (set __MscorlibOnly=1&set __BuildOS=Linux&shift&go if /i "%1" == "osxmscorlib" (set __MscorlibOnly=1&set __BuildOS=OSX&shift&goto Arg_Loop) if /i "%1" == "windowsmscorlib" (set __MscorlibOnly=1&set __BuildOS=Windows_NT&shift&goto Arg_Loop) -if /i "%1" == "vs2013" (set __VSVersion=%1&set __VSProductVersion=120&shift&goto Arg_Loop) -if /i "%1" == "vs2015" (set __VSVersion=%1&set __VSProductVersion=140&shift&goto Arg_Loop) +if /i "%1" == "vs2013" (set __VSVersion=%1&shift&goto Arg_Loop) +if /i "%1" == "vs2015" (set __VSVersion=%1&shift&goto Arg_Loop) if /i "%1" == "skiptestbuild" (set __SkipTestBuild=1&shift&goto Arg_Loop) echo Invalid commandline argument: %1 @@ -97,6 +99,11 @@ for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy RemoteSigned "& goto CheckVS :CheckVS + +set __VSProductVersion= +if /i "%__VSVersion%" == "vs2013" set __VSProductVersion=120 +if /i "%__VSVersion%" == "vs2015" set __VSProductVersion=140 + :: Check presence of VS if defined VS%__VSProductVersion%COMNTOOLS goto CheckVSExistence echo Visual Studio 2013+ (Community is free) is a pre-requisite to build this repository. @@ -240,7 +247,7 @@ echo. echo BuildArch can be: x64, x86 echo BuildType can be: Debug, Release echo Clean - optional argument to force a clean build. -echo VSVersion - optional argument to use VS2013 or VS2015 (default VS2013) +echo VSVersion - optional argument to use VS2013 or VS2015 (default VS2015) echo windowsmscorlib - Build mscorlib for Windows echo linuxmscorlib - Build mscorlib for Linux echo osxmscorlib - Build mscorlib for OS X |