build_amdis.sh 1.38 KB
Newer Older
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
#! /bin/bash

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

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

# at first build AMDiS
cmake -E make_directory ${ROOT}/build_${POSTFIX}
cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
      -DUSE_NEW_CMAKE:BOOL=ON \
      -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
cmake --build ${ROOT}/build_${POSTFIX} --target install

# now build the demos
BASEDIR=${ROOT}/demo
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
BASEDIR=${ROOT}/tools/test_suite
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