Commit 653bcf79 authored by Praetorius, Simon's avatar Praetorius, Simon

build-script for windows added

parent 2e51e7a6
@echo off
set "ROOT=c:/users/sprae/sources/repos/amdis"
set "BOOST_ROOT=c:/users/sprae/programme"
rem # the following line tests whether it is a 64 bits or 32 bits OS and stores the result in the variable BITS
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set BITS=32 || set BITS=64
rem # set the cmake generator
set MSVC_VERSION=14
set MSVC_YEAR=2015
if "%BITS%"=="64" (
set "MSVC_GENERATOR=Visual Studio %MSVC_VERSION% %MSVC_YEAR% Win64"
) else (
set "MSVC_GENERATOR=Visual Studio %MSVC_VERSION% %MSVC_YEAR%"
)
rem # set boost version and directories
set BOOST_MINOR=62
set "BOOST_VERSION=1.%BOOST_MINOR%.0"
set "BOOST_VERSION_STR=1_%BOOST_MINOR%_0"
set "BOOST_DIR=%BOOST_ROOT%/boost_%BOOST_VERSION_STR%"
set "BOOST_LIB_DIR=%BOOST_DIR%/lib%BITS%-msvc-%MSVC_VERSION%.0"
set "POSTFIX=msvc_%MSVC_VERSION%_boost_%BOOST_VERSION%"
rem # at first build AMDiS
set "BUILD=%ROOT%/build/%POSTFIX%"
cmake -E make_directory %BUILD%
cmake -E chdir %BUILD% cmake -DCMAKE_INSTALL_PREFIX:PATH=%ROOT%/install/%POSTFIX% ^
-DENABLE_COMPRESSION:BOOL=OFF -DENABLE_UMFPACK:BOOL=OFF -DENABLE_EXTENSIONS:BOOL=ON ^
-DBOOST_ROOT:PATH=%BOOST_DIR% -DBOOST_LIBRARYDIR:PATH=%BOOST_LIB_DIR% ^
-G "%MSVC_GENERATOR%" %ROOT%/AMDiS
cmake --build %BUILD% --config Debug --target install
rem # now build the demos
set "BASEDIR=%ROOT%/demo"
set "BUILD=%BASEDIR%/build/%POSTFIX%"
cmake -E make_directory %BUILD%
cmake -E chdir %BUILD% cmake -DAMDIS_DIR:PATH=%ROOT%/install/%POSTFIX%/share/amdis ^
-DBOOST_ROOT:PATH=%BOOST_DIR% -DBOOST_LIBRARYDIR:PATH=%BOOST_LIB_DIR% ^
-G "%MSVC_GENERATOR%" %BASEDIR%
cmake --build %BUILD% --config Debug
rem # now build and run the test_suite
set "BASEDIR=%ROOT%/test"
set "BUILD=%BASEDIR%/build/%POSTFIX%"
cmake -E make_directory %BUILD%
cmake -E chdir %BUILD% cmake -DAMDIS_DIR:PATH=%ROOT%/install/%POSTFIX%/share/amdis ^
-DBOOST_ROOT:PATH=%BOOST_DIR% -DBOOST_LIBRARYDIR:PATH=%BOOST_LIB_DIR% ^
-G "%MSVC_GENERATOR%" %BASEDIR%
cmake --build %BUILD% --config Debug
cmake --build %BUILD% --config Debug --target run_test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment