File: install.sh

package info (click to toggle)
ecflow 5.15.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,868 kB
  • sloc: cpp: 269,341; python: 22,756; sh: 3,609; perl: 770; xml: 333; f90: 204; ansic: 141; makefile: 70
file content (72 lines) | stat: -rwxr-xr-x 2,855 bytes parent folder | download | duplicates (3)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
#/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
# Name        :
# Author      : Avi
# Revision    : $Revision: #5 $ 
#
# Copyright 2009- ECMWF.
# This software is licensed under the terms of the Apache Licence version 2.0 
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
# In applying this licence, ECMWF does not waive the privileges and immunities 
# granted to it by virtue of its status as an intergovernmental organisation 
# nor does it submit to any jurisdiction. 
#/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8

# ==================================================================
# Error handling
set -e # stop the shell on first error
set -u # fail when using an undefined variable
set -o pipefail # fail if last(rightmost) command exits with a non-zero status

# ====================================================================
show_error_and_exit() {
   echo "install.sh "
   echo " install.sh  [prefix]"
   echo "  "
   echo "   prefix         - prefix directory for install"
   exit 1
}

prefix_arg=/var/tmp/$USER/install/cmake/ecflow
if  [[ "$#" = 1 ]] ; then
   prefix_arg=$1
fi

set -x # echo script lines as they are executed

#==========================================================================================
mkdir -p build
cd build

#=======================================================================================
# -DCMAKE_PYTHON_INSTALL_TYPE
# -DCMAKE_PYTHON_INSTALL_TYPE = [ local | setup ] # if not specified defaults to local.
# -DCMAKE_PYTHON_INSTALL_PREFIX should *only* used when using python setup.py (CMAKE_PYTHON_INSTALL_TYPE=setup)
#   *AND* for testing python install to local directory.
#  Using make -j8 may fail when using   '-DCMAKE_PYTHON_INSTALL_TYPE=setup' use:
#    > make # OR
#    > make -j8 -k
#
# Boost:  
#  By default it looks for environment variable BOOST_ROOT, if not it can specified on the command line. i.e
#  -DBOOST_ROOT=/var/tmp/ma0/boost/boost_1_53_0
#
# -DCMAKE_BUILD_TYPE: The default build is RelWithDebInfo for ecbuild, this has been
#                     overridden in the top level CMakeLists.txt to Release
#                     It can still be overridden specifying on the command line.
#                     Be sure to remove cache first.

cmake .. -DCMAKE_INSTALL_PREFIX=$prefix_arg  \
         # -DCMAKE_BUILD_TYPE=Release 
         # -DENABLE_UI=OFF        \
         # -DENABLE_PYTHON=OFF    \
         # -DENABLE_ALL_TESTS=ON  \
         # -DCMAKE_PYTHON_INSTALL_TYPE=local \
         # -DCMAKE_PREFIX_PATH="/usr/local/apps/qt/5.5.0/5.5/gcc_64/" \
         # -DCMAKE_CXX_FLAGS="-Wall -Wno-unused-local-typedefs" \
         # -DCMAKE_CXX_COMPILER=xlC_r"
         # -DBOOST_ROOT=/var/tmp/$USER/boost/boost_1_53_0
         
make -j8 -k
make install