Last change
on this file since 26246 was 26246, checked in by jdquinn, 4 years ago |
CHG: Modifications to support newer versions of GCC/GFortran
|
-
Property svn:executable
set to
*
|
File size:
1.4 KB
|
Rev | Line | |
---|
[25745] | 1 | #!/bin/bash
|
---|
| 2 | set -eu
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | ## Constants
|
---|
| 6 | #
|
---|
| 7 | VER="6.0.0"
|
---|
| 8 |
|
---|
| 9 | # Environment
|
---|
| 10 | #
|
---|
| 11 | export CC=mpicc
|
---|
[25860] | 12 | export PREFIX="${ISSM_DIR}/externalpackages/gmt/install" # NOTE: Need to export this to be picked up by customized ConfigUser.cmake (see below). Set to location where external package should be installed.
|
---|
[25745] | 13 |
|
---|
| 14 | # Download source
|
---|
| 15 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gmt-${VER}.tar.gz" "gmt-${VER}.tar.gz"
|
---|
| 16 |
|
---|
| 17 | # Unpack source
|
---|
| 18 | tar -zxvf gmt-${VER}.tar.gz
|
---|
| 19 |
|
---|
| 20 | # Cleanup
|
---|
[25860] | 21 | rm -rf ${PREFIX} src
|
---|
| 22 | mkdir -p ${PREFIX} src
|
---|
[25745] | 23 |
|
---|
| 24 | # Move source to 'src' directory
|
---|
| 25 | mv gmt-${VER}/* src
|
---|
| 26 | rm -rf gmt-${VER}
|
---|
| 27 |
|
---|
| 28 | # Copy custom configuration files
|
---|
[26246] | 29 | cp ./configs/6/linux/cmake/ConfigUser.cmake ./src/cmake
|
---|
[25745] | 30 |
|
---|
| 31 | # Configure
|
---|
| 32 | cd src
|
---|
| 33 | mkdir build
|
---|
| 34 | cd build
|
---|
| 35 |
|
---|
| 36 | # NOTE:
|
---|
| 37 | # - There is a CMake variable named CURL_ROOT in src/cmake/ConfigUser.cmake
|
---|
| 38 | # that, ostensibly, allows for supplying the path to curl when it is in a
|
---|
| 39 | # non-standard location. That said, newer versions of CMake will ignore said
|
---|
| 40 | # variable and instead try to find curl itself. Passing in the two options
|
---|
| 41 | # below overrides this behavior.
|
---|
| 42 | #
|
---|
| 43 | cmake \
|
---|
| 44 | -DCURL_LIBRARY="${CURL_ROOT}/lib" \
|
---|
| 45 | -DCURL_INCLUDE_DIR="${CURL_ROOT}/include" \
|
---|
| 46 | ..
|
---|
| 47 |
|
---|
| 48 | # Compile and install
|
---|
| 49 | if [ $# -eq 0 ]; then
|
---|
| 50 | make
|
---|
| 51 | make install
|
---|
| 52 | else
|
---|
| 53 | make -j $1
|
---|
| 54 | make -j $1 install
|
---|
| 55 | fi
|
---|
[25989] | 56 |
|
---|
| 57 | # Make necessary link on RHEL
|
---|
| 58 | if [[ -d ${PREFIX}/lib64 && ! -d ${PREFIX}/lib ]]; then
|
---|
| 59 | cd ${PREFIX}
|
---|
| 60 | ln -s ./lib64 ./lib
|
---|
| 61 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.