summaryrefslogtreecommitdiff
path: root/cmake_msbuild.cmd
diff options
context:
space:
mode:
authorSteve MacLean <stmaclea@microsoft.com>2019-03-02 04:07:35 (GMT)
committerGitHub <noreply@github.com>2019-03-02 04:07:35 (GMT)
commit42bc2de2c63fe0c95a582e642ff97b2fe0d4bb7e (patch)
tree17cb448a25ea78394faba09f2f4b1b0b2b961183 /cmake_msbuild.cmd
parentc1801e85024add717f518feb6a9caed60d54500f (diff)
downloadcoreclr-42bc2de2c63fe0c95a582e642ff97b2fe0d4bb7e.zip
coreclr-42bc2de2c63fe0c95a582e642ff97b2fe0d4bb7e.tar.gz
coreclr-42bc2de2c63fe0c95a582e642ff97b2fe0d4bb7e.tar.bz2
Use arcade's version of dotnet to build (#22755)
* Use arcade dotnet * Add cmake_msbuild.cmd Move msbuild.cmd to cmake_msbuild.bat Document intent that this file is only used to resolve Windows cmake dependency on desktop msbuild.exe Remove one instance of msbuild.cmd * Fix inittools.cmd * Remove spurious setup_vs_tools.cmd calls
Diffstat (limited to 'cmake_msbuild.cmd')
-rw-r--r--cmake_msbuild.cmd28
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake_msbuild.cmd b/cmake_msbuild.cmd
new file mode 100644
index 0000000..399b080
--- /dev/null
+++ b/cmake_msbuild.cmd
@@ -0,0 +1,28 @@
+:: Windows CMake has a dependency on desktop msbuild.exe because it generates
+:: Visual Studio *.vcxproj solutions.
+:: This file has cmake in its name to avoid accidentally introducing
+:: another dependency on desktop msbuild.exe
+@if not defined _echo @echo off
+setlocal
+
+set "__ProjectDir=%~dp0"
+
+call "%__ProjectDir%"\setup_vs_tools.cmd
+
+REM setup_vs_tools.cmd will correctly echo error message.
+if NOT '%ERRORLEVEL%' == '0' exit /b 1
+
+:: Clear the 'Platform' env variable for this session, as it's a per-project setting within the build, and
+:: misleading value (such as 'MCD' in HP PCs) may lead to build breakage (issue: #69).
+set Platform=
+set __ProjectDir=
+
+pushd %~dp0
+echo Running: msbuild.exe %*
+call msbuild.exe %*
+popd
+if NOT [%ERRORLEVEL%]==[0] (
+ exit /b 1
+)
+
+exit /b 0