| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# Script for building Trilinos on Linux machines with configurations |
| 4 |
# similar to gibbon.math.ttu.edu. |
| 5 |
# |
| 6 |
# Assumes ExodusII and NetCDF libraries are installed. |
| 7 |
# |
| 8 |
# Originally written by Ross Bartlett, modified by Kevin Long |
| 9 |
|
| 10 |
|
| 11 |
EXTRA_ARGS=$@ |
| 12 |
|
| 13 |
# Set the location of the compilers and libraries. On a simple out-of-the-box |
| 14 |
# Linux system, COMPILER_ROOT will probably be someplace like /usr/local. |
| 15 |
# On Kevin's TTU machines, there are multiple compiler versions located |
| 16 |
# in subdirectories of /usr/local, e.g., /usr/local/gcc-4.3.2. |
| 17 |
|
| 18 |
COMPILER_VERSION=gcc-4.3.2 |
| 19 |
COMPILER_ROOT=/usr/local/${COMPILER_VERSION} |
| 20 |
BIN_PATH=${COMPILER_ROOT}/bin |
| 21 |
LIB_PATH=${COMPILER_ROOT}/lib |
| 22 |
INC_PATH=${COMPILER_ROOT}/include |
| 23 |
|
| 24 |
# Set the path to the Trilinos data files. Some of the Sundance tests require |
| 25 |
# large mesh files stored in TrilinosData. If the TrilinosData directory |
| 26 |
# cannot be found, these tests will be disabled. |
| 27 |
TRILINOS_DATA_DIR=${HOME}/Code/TrilinosData |
| 28 |
|
| 29 |
# Set the fortran compiler and libraries. |
| 30 |
# Currently configured for gfortran. Older systems may need g77 and -lg2c. |
| 31 |
FORTRAN_COMP=${BIN_PATH}/gfortran |
| 32 |
# IMPORTANT: be sure to use -lgfortran instead of libgfortran.a so that |
| 33 |
# the linker can choose correctly between shared and static |
| 34 |
# fortran libraries when you're building shared Trilinos libraries. |
| 35 |
FORTRAN_LIBS="-lgfortran" |
| 36 |
|
| 37 |
# Run cmake |
| 38 |
cmake \ |
| 39 |
-D CMAKE_BUILD_TYPE:STRING=DEBUG \ |
| 40 |
-D CMAKE_SYSTEM_LIBRARY_PATH:FILEPATH="$LIB_PATH" \ |
| 41 |
-D CMAKE_SYSTEM_INCLUDE_PATH:FILEPATH="$INC_PATH" \ |
| 42 |
-D CMAKE_Fortran_COMPILER:FILEPATH="${FORTRAN_COMP}" \ |
| 43 |
-D BUILD_SHARED_LIBS:BOOL=OFF \ |
| 44 |
-D TPL_ENABLE_ExodusII:BOOL=ON \ |
| 45 |
-D Trilinos_EXTRA_LINK_FLAGS:STRING=${FORTRAN_LIBS} \ |
| 46 |
-D Trilinos_ENABLE_CHECKED_STL:BOOL=ON \ |
| 47 |
-D Trilinos_ENABLE_STRONG_CXX_COMPILE_WARNINGS:BOOL=OFF \ |
| 48 |
-D Trilinos_ENABLE_TESTS:BOOL=ON \ |
| 49 |
-D Trilinos_ENABLE_Sundance:BOOL=ON \ |
| 50 |
-D Sundance_ENABLE_BROKEN_CODE:BOOL=OFF \ |
| 51 |
-D Trilinos_DATA_DIR:FILEPATH="${TRILINOS_DATA_DIR}" \ |
| 52 |
-D NOX_ENABLE_LOCA:BOOL=OFF \ |
| 53 |
-D CMAKE_INSTALL_PREFIX:PATH=$PWD \ |
| 54 |
$EXTRA_ARGS \ |
| 55 |
../../Trilinos |
| 56 |
|
| 57 |
#-D Trilinos_VERBOSE_CONFIGURE:BOOL=ON \ |