forked from dotnet/coreclr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmake_msbuild.cmd
28 lines (22 loc) · 785 Bytes
/
cmake_msbuild.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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