Windows.bat 2.32 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
    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"
    set QT_VERSION=
    IF "%ARCHITECTURE%" == "x64" (
Jan Möbius's avatar
Jan Möbius committed
20 21
      set QT_INSTALL_PATH=E:\Qt\Qt5.3.1-vs2013-%STRING_ARCH%\5.3\msvc2013_64_opengl
      set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.3.1-vs2013-%STRING_ARCH%\5.3\msvc2013_64_opengl
22 23 24
    )

    IF "%ARCHITECTURE%" == "x32" (
Jan Möbius's avatar
Jan Möbius committed
25 26
      set QT_INSTALL_PATH=E:\Qt\Qt5.3.1-vs2013-%STRING_ARCH%\5.3\msvc2013_opengl
      set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.3.1-vs2013-%STRING_ARCH%\5.3\msvc2013_opengl
27 28 29 30
    )
) 

IF "%BUILD_PLATFORM%" == "VS2015" (
Jan Möbius's avatar
Jan Möbius committed
31
    set LIBPATH=E:\libs\VS2015
32 33 34 35 36 37
    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"

    set QT_VERSION=
    IF "%ARCHITECTURE%" == "x64" (
Jan Möbius's avatar
Jan Möbius committed
38 39
      set QT_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015_64
      set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015_64
40 41 42
    )

    IF "%ARCHITECTURE%" == "x32" (
Jan Möbius's avatar
Jan Möbius committed
43 44
      set QT_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015
      set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015
45 46 47 48 49
    )

) 


Isaak Lim's avatar
Isaak Lim committed
50
"cmake" -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

Isaak Lim's avatar
Isaak Lim committed
71
"cmake" -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%