aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@gentoo.org>2009-12-03 21:51:58 -0500
committerJustin Bronder <jsbronder@gentoo.org>2009-12-04 11:11:16 -0500
commitd82198233041e9b26d8feab4b50f77d5564bb377 (patch)
tree2241481835e0c7bcb29379fe600c124120408e08 /eclass/mpi.eclass
parentFix eselect-mpi config file. (diff)
downloadsci-d82198233041e9b26d8feab4b50f77d5564bb377.tar.gz
sci-d82198233041e9b26d8feab4b50f77d5564bb377.tar.bz2
sci-d82198233041e9b26d8feab4b50f77d5564bb377.zip
add mpi_pkg_set_ld_library_path()
Diffstat (limited to 'eclass/mpi.eclass')
-rw-r--r--eclass/mpi.eclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index 8f9e60acd..9f25ed0f5 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -355,6 +355,17 @@ mpi_pkg_cxx() { _mpi_pkg_compiler "MPI_CXX" "cxx c++"; }
mpi_pkg_f77() { _mpi_pkg_compiler "MPI_F77" "f77"; }
mpi_pkg_fc() { _mpi_pkg_compiler "MPI_FC" "f90 fc"; }
+
+# @FUNCTION: mpi_pkg_set_ld_library_path
+# @USAGE:
+# @DESCRIPTION: Adds the correct path(s) to the end of LD_LIBRARY_PATH. Does
+# nothing if the build is unclassed.
+mpi_pkg_set_ld_library_path() {
+ if mpi_classed; then
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(_get_eselect_var LD_LIBRARY_PATH)"
+ fi
+}
+
# If classed, we can ask eselect-mpi. Otherwise we'll look for some common
# executable names in ${ROOT}usr/bin.
_mpi_pkg_compiler() {
@@ -389,7 +400,7 @@ mpi_pkg_set_env() {
export F77=$(mpi_pkg_f77)
export FC=$(mpi_pkg_fc)
export PKG_CONFIG_PATH="$(mpi_root)$(get_libdir)/pkgconfig:${PKG_CONFIG_PATH}"
- export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(_get_eselect_var LD_LIBRARY_PATH)"
+ mpi_pkg_set_ld_library_path
fi
}