forked from interpretml/interpret
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
49 lines (44 loc) · 1.58 KB
/
build.bat
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
@ECHO OFF
SETLOCAL
REM The free version of Visual Studio (Community) is sufficient for compiling InterpretML for Windows.
REM Visual Studio Community can be downloaded for free here: https://visualstudio.microsoft.com/vs/
SET root_path=%~dp0
SET build_32_bit=0
SET build_64_bit=1
SET "extra_analysis= "
for %%x in (%*) do (
IF "%%x"=="-32bit" (
SET build_32_bit=1
)
IF "%%x"=="-no64bit" (
SET build_64_bit=0
)
IF "%%x"=="-analysis" (
SET extra_analysis=/p:EnableClangTidyCodeAnalysis=True /p:RunCodeAnalysis=True
)
)
IF %build_64_bit% EQU 1 (
MSBuild.exe "%root_path%shared\ebm_native\ebm_native.vcxproj" /p:Configuration=Release /p:Platform=x64 %extra_analysis%
IF %ERRORLEVEL% NEQ 0 (
ECHO MSBuild for Release x64 returned error code %ERRORLEVEL%
EXIT /B %ERRORLEVEL%
)
MSBuild.exe "%root_path%shared\ebm_native\ebm_native.vcxproj" /p:Configuration=Debug /p:Platform=x64 %extra_analysis%
IF %ERRORLEVEL% NEQ 0 (
ECHO MSBuild for Debug x64 returned error code %ERRORLEVEL%
EXIT /B %ERRORLEVEL%
)
)
IF %build_32_bit% EQU 1 (
MSBuild.exe "%root_path%shared\ebm_native\ebm_native.vcxproj" /p:Configuration=Release /p:Platform=Win32 %extra_analysis%
IF %ERRORLEVEL% NEQ 0 (
ECHO MSBuild for Release x86 returned error code %ERRORLEVEL%
EXIT /B %ERRORLEVEL%
)
MSBuild.exe "%root_path%shared\ebm_native\ebm_native.vcxproj" /p:Configuration=Debug /p:Platform=Win32 %extra_analysis%
IF %ERRORLEVEL% NEQ 0 (
ECHO MSBuild for Debug x86 returned error code %ERRORLEVEL%
EXIT /B %ERRORLEVEL%
)
)
EXIT /B 0