summaryrefslogtreecommitdiff
path: root/build-test.cmd
diff options
context:
space:
mode:
authorJacek Blaszczynski <biosciencenow@outlook.com>2017-10-24 00:04:05 (GMT)
committerJacek Blaszczynski <biosciencenow@outlook.com>2017-10-24 00:04:05 (GMT)
commit811761c22da85b7bbc6861756ee20be906a04057 (patch)
tree78a79440e0abaa7c3eb5a3b7f81561a5ce4caa11 /build-test.cmd
parent83a3a7ddf9a399d1c065a6480b1c95d218a175dc (diff)
downloadcoreclr-811761c22da85b7bbc6861756ee20be906a04057.zip
coreclr-811761c22da85b7bbc6861756ee20be906a04057.tar.gz
coreclr-811761c22da85b7bbc6861756ee20be906a04057.tar.bz2
Cleanup VsDevCmd.bat usage and improve build system messages to ease diagnostics
Diffstat (limited to 'build-test.cmd')
-rw-r--r--build-test.cmd19
1 files changed, 11 insertions, 8 deletions
diff --git a/build-test.cmd b/build-test.cmd
index b247090..56527bd 100644
--- a/build-test.cmd
+++ b/build-test.cmd
@@ -7,6 +7,10 @@ set __VCBuildArch=x86_amd64
set __BuildType=Debug
set __BuildOS=Windows_NT
+:: Define a prefix for most output progress messages that come from this script. That makes
+:: it easier to see where these are coming from. Note that there is a trailing space here.
+set __MsgPrefix=BUILDTEST:
+
:: Default to highest Visual Studio version available
::
:: For VS2015 (and prior), only a single instance is allowed to be installed on a box
@@ -22,7 +26,10 @@ set __BuildOS=Windows_NT
:: is already configured to use that toolset. Otherwise, we will fallback to using the VS2015
:: toolset if it is installed. Finally, we will fail the script if no supported VS instance
:: can be found.
-if defined VisualStudioVersion goto :Run
+if defined VisualStudioVersion (
+ if not defined __VSVersion echo %__MsgPrefix%Detected Visual Studio %VisualStudioVersion% developer command ^prompt environment
+ goto Run
+)
set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist %_VSWHERE% (
@@ -30,7 +37,7 @@ if exist %_VSWHERE% (
)
if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
if not exist "%_VSCOMNTOOLS%" (
- echo Error: Visual Studio 2015 or 2017 required.
+ echo %__MsgPrefix%Error: Visual Studio 2015 or 2017 required.
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
exit /b 1
)
@@ -49,10 +56,6 @@ if defined VS150COMNTOOLS (
set __VSVersion=vs2015
)
-:: Define a prefix for most output progress messages that come from this script. That makes
-:: it easier to see where these are coming from. Note that there is a trailing space here.
-set __MsgPrefix=BUILDTEST:
-
set "__ProjectDir=%~dp0"
:: remove trailing slash
if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
@@ -120,8 +123,8 @@ if defined __BuildAgainstPackagesArg (
)
)
-echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat"
-call "%__VSToolsRoot%\VsDevCmd.bat"
+:: echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat"
+:: call "%__VSToolsRoot%\VsDevCmd.bat"
@if defined _echo @echo on
set __RunArgs=-BuildOS=%__BuildOS% -BuildType=%__BuildType% -BuildArch=%__BuildArch%