-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.cmd
69 lines (51 loc) · 1.38 KB
/
build.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
@echo off
setlocal
if not defined BuildOS (
set BuildOS=Windows
)
if not defined BuildArch (
set BuildArch=x64
)
if not defined BuildType (
set BuildType=Debug
)
if not defined CORECLR_PATH (
set CORECLR_PATH=C:/git/runtime/src/coreclr
)
if not defined CORECLR_BIN (
set CORECLR_BIN=C:/git/runtime/artifacts/bin/coreclr/%BuildOS%.%BuildArch%.%BuildType%
)
set VS_ENT_CMD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
set VS_COM_CMD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
if not defined VS_CMD_PATH (
if exist %VS_ENT_CMD_PATH% (
set VS_CMD_PATH=%VS_ENT_CMD_PATH%
) else if exist %VS_COM_CMD_PATH% (
set VS_CMD_PATH=%VS_COM_CMD_PATH%
) else (
echo No VS developer command prompt detected!
goto :EOF
)
)
echo CORECLR_PATH : %CORECLR_PATH%
echo BuildOS : %BuildOS%
echo BuildArch : %BuildArch%
echo BuildType : %BuildType%
echo VS PATH : %VS_CMD_PATH%
echo.
echo Building
if not exist bin\ (
mkdir bin
)
pushd bin
cmake -G "Visual Studio 16 2019" ..\ -DCMAKE_BUILD_TYPE=Debug
echo Calling VS Developer Command Prompt to build
call %VS_CMD_PATH%
msbuild -v:m CorProfiler.sln
popd
echo.
echo.
echo.
echo Done building
echo Copying binary to main directory
copy /y bin\Debug\CorProfiler.dll .