From 9abdcfa31083750d09eb147811345b625575620e Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Wed, 19 Aug 2015 21:12:40 -0700 Subject: Auto-detect VS2015 Change build and tests scripts to detect VS2015 and use that if available by default --- tests/runtest.cmd | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'tests/runtest.cmd') diff --git a/tests/runtest.cmd b/tests/runtest.cmd index e3e83084d7..6c225fbb20 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -2,9 +2,11 @@ setlocal EnableDelayedExpansion set __ProjectFilesDir=%~dp0 -:: 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 :: Default __Exclude to issues.targets set __Exclude=%~dp0\issues.targets @@ -20,8 +22,8 @@ if /i "%1" == "SkipWrapperGeneration" (set __SkipWrapperGeneration=true&shift&go if /i "%1" == "Exclude" (set __Exclude=%2&shift&shift&goto Arg_Loop) if /i "%1" == "TestEnv" (set __TestEnv=%2&shift&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" == "/?" (goto Usage) @@ -30,6 +32,10 @@ shift :ArgsDone :: Check prerequisites +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 CheckMSbuild echo InVisual Studio 2013+ (Community is free) is a pre-requisite to build this repository. @@ -150,7 +156,7 @@ echo BuildType can be: Debug, Release echo SkipWrapperGeneration- Optional parameter - this will run the same set of tests as the last time it was run echo Exclude- Optional parameter - this will exclude individual tests from running, specified by ExcludeList ItemGroup in an .targets file. echo TestEnv- Optional parameter - this will run a custom script to set custom test envirommnent settings. -echo VSVersion- optional argument to use VS2013 or VS2015 (default VS2013) +echo VSVersion- optional argument to use VS2013 or VS2015 (default VS2015) echo CORE_ROOT The path to the runtime exit /b 1 -- cgit v1.2.3