build_amdis.sh 1.5 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/bash

ROOT=${PWD}
POSTFIX="rel"
CONFIURATION="Release"

if [ "$1" == "Debug" ]; then
  POSTFIX="dbg"
  CONFIURATION="Debug"
fi

# at first build AMDiS
13
cmake -E remove_directory ${ROOT}/build_${POSTFIX}
14
15
16
17
18
19
20
21
22
cmake -E make_directory ${ROOT}/build_${POSTFIX}
cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
      -DCMAKE_INSTALL_PREFIX=${ROOT}/install_${POSTFIX} \
      -DCMAKE_BUILD_TYPE=${CONFIURATION} \
      -DENABLE_CXX11:BOOL=ON \
      -DENABLE_COMPRESSION:BOOL=OFF \
      -DENABLE_UMFPACK:BOOL=OFF \
      -DBOOST_ROOT:PATH=${ROOT}/install/boost \
       ${ROOT}/AMDiS
23
cmake --build ${ROOT}/build_${POSTFIX} --target install -- -j2
24
25
26

# now build the demos
BASEDIR=${ROOT}/demo
27
cmake -E remove_directory ${BASEDIR}/build_${POSTFIX}
28
29
30
31
32
33
34
35
36
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
      -DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
      -DCMAKE_BUILD_TYPE=${CONFIURATION} \
      -DBOOST_ROOT:PATH=${ROOT}/install/boost \
       ${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}

# now build and run the test_suite
37
38
BASEDIR=${ROOT}/test
cmake -E remove_directory ${BASEDIR}/build_${POSTFIX}
39
40
41
42
43
44
45
46
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
      -DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
      -DCMAKE_BUILD_TYPE=${CONFIURATION} \
      -DBOOST_ROOT:PATH=${ROOT}/install/boost \
       ${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}
cmake --build ${BASEDIR}/build_${POSTFIX} --target test