Windows.bat 2.34 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
mkdir build-release

cd build-release

IF "%ARCHITECTURE%" == "x64" (
  set ARCH_VS= Win64
  set STRING_ARCH=64-Bit
) else (
  set ARCH_VS=
  set STRING_ARCH=32-Bit
)

IF "%BUILD_PLATFORM%" == "VS2013" (
Jan Möbius's avatar
Jan Möbius committed
14
    set LIBPATH=E:\libs\VS2013
15
16
17
18
19
20
    set GTESTVERSION=gtest-1.6.0
    set GENERATOR=Visual Studio 12%ARCH_VS%
    set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
) 

IF "%BUILD_PLATFORM%" == "VS2015" (
Jan Möbius's avatar
Jan Möbius committed
21
    set LIBPATH=E:\libs\VS2015
22
23
24
25
26
27
    set GTESTVERSION=gtest-1.7.0
    set GENERATOR=Visual Studio 14%ARCH_VS%
    set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"

) 

28
29
30
31
32
33
IF "%BUILD_PLATFORM%" == "VS2017" (
    set LIBPATH=E:\libs\VS2017
    set GTESTVERSION=gtest-1.7.0
    set GENERATOR=Visual Studio 15%ARCH_VS%
    set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com"
)
34

Jan Möbius's avatar
Jan Möbius committed
35
36
ECHO "==============================================================="
ECHO "==============================================================="
Jan Möbius's avatar
Jan Möbius committed
37
38
39
40
41
42
43
44
ECHO "Building with :"
ECHO "ARCHITECTURE        : %ARCHITECTURE%"
ECHO "BUILD_PLATFORM      : %BUILD_PLATFORM%"
ECHO "GTESTVERSION        : %GTESTVERSION%"
ECHO "GENERATOR           : %GENERATOR%"
ECHO "CMAKE_CONFIGURATION : %CMAKE_CONFIGURATION%"
ECHO "VS_PATH             : %VS_PATH%"
ECHO "LIBPATH             : %LIBPATH%"
Jan Möbius's avatar
Jan Möbius committed
45
46
ECHO "==============================================================="
ECHO "==============================================================="
Jan Möbius's avatar
Jan Möbius committed
47
48
49



Jan Möbius's avatar
Jan Möbius committed
50
"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%"  -DCMAKE_BUILD_TYPE=Release %CMAKE_CONFIGURATION% ..
51
52
53
54
55

%VS_PATH% /Build "Release" OpenVolumeMesh.sln /Project "ALL_BUILD"

IF %errorlevel% NEQ 0 exit /b %errorlevel%

56
57
58
cd ..

cd src\Unittests\TestFiles
Jan Möbius's avatar
Jan Möbius committed
59

60
61
62
..\..\..\build-release\src\Unittests\Release\unittests.exe

cd ..\..\..\
Jan Möbius's avatar
Jan Möbius committed
63
64
65

IF %errorlevel% NEQ 0 exit /b %errorlevel%

66
67
68
69
70

mkdir build-debug

cd build-debug

Jan Möbius's avatar
Jan Möbius committed
71
"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Debug %CMAKE_CONFIGURATION% ..
72
73
74
75

%VS_PATH% /Build "Debug" OpenVolumeMesh.sln /Project "ALL_BUILD"

IF %errorlevel% NEQ 0 exit /b %errorlevel%
Jan Möbius's avatar
Jan Möbius committed
76

Jan Möbius's avatar
Jan Möbius committed
77
cd ..
78
79
80
81
82

cd src\Unittests\TestFiles

..\..\..\build-debug\src\Unittests\Debug\unittests.exe

Jan Möbius's avatar
Jan Möbius committed
83
84

IF %errorlevel% NEQ 0 exit /b %errorlevel%