updated to modern VTK
[engrid-github.git] / src / scripts / rebuild.sh
blobd1cf264cca2fa2840e0122103670658d0ea4f8a6
1 #!/usr/bin/env bash
2 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 # + +
4 # + This file is part of enGrid. +
5 # + +
6 # + Copyright 2008-2014 enGits GmbH +
7 # + +
8 # + enGrid is free software: you can redistribute it and/or modify +
9 # + it under the terms of the GNU General Public License as published by +
10 # + the Free Software Foundation, either version 3 of the License, or +
11 # + (at your option) any later version. +
12 # + +
13 # + enGrid is distributed in the hope that it will be useful, +
14 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 # + GNU General Public License for more details. +
17 # + +
18 # + You should have received a copy of the GNU General Public License +
19 # + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 # + +
21 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 set -ex
25 FAILURE=0
27 #set up environment
28 # source ./scripts/setup_paths.sh engits yes
29 source /opt/engits/bin/engrid_environment.sh
31 echo "BUILDING TOOLS":
32 echo "gcc = $(which gcc)"
33 echo "g++ = $(which g++)"
34 echo "qmake = $(which qmake)"
35 echo "make = $(which make)"
36 gcc -v
37 g++ -v
38 qmake -v
39 make -v
41 echo "PATHS:"
42 echo QTDIR = $QTDIR
43 echo VTKLIBDIR = $VTKLIBDIR
44 echo VTKINCDIR = $VTKINCDIR
45 echo CGNSINCDIR = $CGNSINCDIR
46 echo CGNSLIBDIR = $CGNSLIBDIR
47 echo PATH = $PATH
48 echo LD_LIBRARY_PATH = $LD_LIBRARY_PATH
50 echo "Building netgen"
51 ./scripts/build-nglib.sh
53 MAKEOPTIONS=""
55 MSG="Building engrid.pro debug version"
56 echo $MSG
57 qmake && make distclean && qmake engrid.pro && make $MAKEOPTIONS debug || FAILURE=1
58 if [ $FAILURE -eq 1 ]
59 then
60 echo "$MSG failed."
61 exit 1
64 MSG="Building engrid.pro.cgns debug version"
65 echo $MSG
66 qmake && make distclean && qmake engrid.pro.cgns && make $MAKEOPTIONS debug || FAILURE=1
67 if [ $FAILURE -eq 1 ]
68 then
69 echo "$MSG failed."
70 exit 1
73 MSG="Building engrid.pro release version"
74 echo $MSG
75 qmake && make distclean && qmake engrid.pro && make $MAKEOPTIONS release || FAILURE=1
76 if [ $FAILURE -eq 1 ]
77 then
78 echo "$MSG failed."
79 exit 1
82 MSG="Building engrid.pro.cgns release version"
83 echo $MSG
84 qmake && make distclean && qmake engrid.pro.cgns && make $MAKEOPTIONS release || FAILURE=1
85 if [ $FAILURE -eq 1 ]
86 then
87 echo "$MSG failed."
88 exit 1
91 echo "SUCCESS: Everything compiles."