forked from bigartm/bigartm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
51 lines (40 loc) · 1.64 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
50
REM =========================================================================================
REM This script is a convenience helper used to build multiple BigARTM versions.
REM It is not recommended for BigARTM users to use this script.
REM Refer to http://bigartm.org for detailed instructions on how to build BigARTM on Windows.
REM =========================================================================================
REM Set this variables:
REM set CONFIG=[debug|RelWithDebInfo]
REM set FLOVER=[32|64]
REM set VSVERSION=[11|12]
REM set BIGARTM_VERSION=...
if "%FLOVER%" == "32" (
set INSTALL_FOLDER="C:\Program Files (x86)\BigARTM"
set CMAKE_OPTIONS="Visual Studio %VSVERSION%"
) else (
set INSTALL_FOLDER="C:\Program Files\BigARTM"
set CMAKE_OPTIONS="Visual Studio %VSVERSION% Win64"
)
set BOOST_ROOT=C:\local\boost_1_57_0
set BOOST_LIBRARYDIR=C:\local\boost_1_57_0\lib%FLOVER%-msvc-%VSVERSION%.0
set TARGET_PACKAGE="BigARTM_%BIGARTM_VERSION%_vs%VSVERSION%_win%FLOVER%_%CONFIG%.7z"
REM CD to root folder
cd C:\Users\Administrator\Documents\GitHub\bigartm
REM Cleanup
rmdir build /s /q
rmdir python\build /s /q
rmdir %INSTALL_FOLDER% /s /q
if EXIST %TARGET_PACKAGE% (del %TARGET_PACKAGE%)
REM Build
mkdir build && cd build
cmake .. -G%CMAKE_OPTIONS%
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild /p:Configuration=%CONFIG% INSTALL.vcxproj
if %errorlevel% neq 0 exit /b %errorlevel%
REM Copy libs
mkdir %INSTALL_FOLDER%\lib
cp lib\%CONFIG%\artm.lib %INSTALL_FOLDER%\lib\artm.lib
cp lib\%CONFIG%\protobuf.lib %INSTALL_FOLDER%\lib\protobuf.lib
REM Create the package
cd ..
"C:\Program Files\7-Zip\7z.exe" a %TARGET_PACKAGE% %INSTALL_FOLDER%\*