forked from trilinos/Trilinos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinux-brain-gcc-4.5.1-rpath-serial-debug-cmake
executable file
·35 lines (29 loc) · 1.38 KB
/
linux-brain-gcc-4.5.1-rpath-serial-debug-cmake
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
#!/bin/bash
# This script shows how to manually set RPATH on the link line to use the GCC
# 4.5.1 libraries so that you don't need to set LD_LIBRARY_PATH in the
# environment.
GCC_INSTALL_BASE=/usr/local/trilinos-toolset
EXTRA_ARGS=$@
cmake \
-D CMAKE_BUILD_TYPE:STRING=DEBUG \
-D Trilinos_ENABLE_CHECKED_STL:BOOL=ON \
-D CMAKE_CXX_COMPILER:PATH=$GCC_INSTALL_BASE/bin/g++ \
-D CMAKE_C_COMPILER:PATH=$GCC_INSTALL_BASE/bin/gcc \
-D CMAKE_Fortran_COMPILER:PATH=$GCC_INSTALL_BASE/bin/gfortran \
-D Trilinos_EXTRA_LINK_FLAGS:STRING="-Wl,-rpath,$GCC_INSTALL_BASE/lib64" \
-D TPL_ENABLE_Boost:BOOL=ON \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D Trilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON \
-D CMAKE_INSTALL_PREFIX:PATH=$HOME/PROJECTS/install/trilinos/serial/dbg \
-D DART_TESTING_TIMEOUT:STRING=180.0 \
$EXTRA_ARGS \
../../../Trilinos
# (2010/11/29) For some reason, building with shared libraries with this GCC
# compiler gives the link error:
#
#/usr/bin/ld: /usr/local/trilinos-toolset/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libiberty.a(hashtab.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
#/usr/local/trilinos-toolset/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libiberty.a: could not read symbols: Bad value
#
# Therefore, I am just going to build without shared libraries.
#
# -D BUILD_SHARED_LIBS:BOOL=ON \