Skip to content
Snippets Groups Projects
Commit d54d54a0 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

cleanup modulefile

- do not set LD_LIBRARY_PATH on OSX
- set LIBRARY_PATH also when dynamic libraries are disabled
parent b4ec4818
No related branches found
No related tags found
No related merge requests found
......@@ -30,10 +30,16 @@ prepend-path PATH $bindir
prepend-path CPATH $includedir
prepend-path INCLUDE $includedir
# library path, can also be useful when soext is not defined in order to link lib$progname.a
prepend-path LIBRARY_PATH $libdir
# path for VIM syntax
setenv PLUMED_VIMPATH $libdir/$progname/vim
# paths for libraries are only set if plumed is compiled as a dynamic library
# path for pkgconfig
prepend-path PKG_CONFIG_PATH $libdir/pkgconfig/
# some paths are only set if plumed is compiled as a dynamic library
if { [ string length $soext ] != 0 } {
# this is checking if PLUMED_KERNEL is already set
......@@ -42,10 +48,15 @@ if { [module-info mode load] && [ info exists ::env(PLUMED_KERNEL) ] } {
puts stderr " (typically means that you are loading two plumed modules, both defining dynamic libraries)"
}
# library path
prepend-path LIBRARY_PATH $libdir
prepend-path LD_LIBRARY_PATH $libdir
# ld_library_path is only set on Linux
if { $soext == "so" } {
prepend-path LD_LIBRARY_PATH $libdir
}
# python path
prepend-path PYTHONPATH $libdir/$progname/python
prepend-path PKG_CONFIG_PATH $libdir/pkgconfig/
# plumed kernel
setenv PLUMED_KERNEL $libdir/lib${progname}Kernel.$soext
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment