cmake LIB environment variable check, and GMXRC check due to Klaus Kaempf.
authorSander Pronk <pronk@cbr.su.se>
Thu, 7 Oct 2010 14:55:25 +0000 (16:55 +0200)
committerSander Pronk <pronk@cbr.su.se>
Thu, 7 Oct 2010 14:55:25 +0000 (16:55 +0200)
CMakeLists.txt
scripts/GMXRC.bash.cmakein
scripts/GMXRC.csh.cmakein
scripts/GMXRC.zsh.cmakein

index 13acc4925fd93cab948aecd4f029cbd7434b6b1f..6369b03c57ba68c0e4786fd84cba23f796cfbb2e 100644 (file)
@@ -686,7 +686,11 @@ endif (NOT DEFINED GROMACS_C_FLAGS_SET)
 ########################################################################
 # Specify install locations and which subdirectories to process        #
 ########################################################################
-set(LIB_INSTALL_DIR  ${CMAKE_INSTALL_PREFIX}/lib)
+if ( DEFINED LIB )
+    set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}")
+else()
+    set(LIB_INSTALL_DIR  ${CMAKE_INSTALL_PREFIX}/lib)
+endif()
 set(BIN_INSTALL_DIR  ${CMAKE_INSTALL_PREFIX}/bin)
 set(DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/gromacs)
 set(MAN_INSTALL_DIR  ${CMAKE_INSTALL_PREFIX}/share/man)
index 293530b14a9e61abe9931169e272c290d1267343..1f7110e4d9cc964526a48e3e4ad3d94ecdf44410 100644 (file)
@@ -8,8 +8,12 @@
 tmppath=""
 for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
   if test "$i" != "$GMXLDLIB"; then
+    if test ${tmppath} == ""; then
+      tmppath=$i
+    else
     tmppath=${tmppath}:$i
   fi
+  fi
 done
 LD_LIBRARY_PATH=$tmppath
 
index ff9eba8d6b8c7ace39d1b31ad770cd9ec9cbe363..0f0e960947504118f408710fc89d23813b1bed77 100644 (file)
@@ -16,7 +16,13 @@ if (! $?GMXMAN) setenv GMXMAN ""
 # remove previous gromacs part from ld_library_path
 set tmppath = ""
 foreach i ( `echo $LD_LIBRARY_PATH | sed "s/:/ /g"` )
-  if ( "$i" != "$GMXLDLIB" ) set tmppath = "${tmppath}:$i"
+  if ( "$i" != "$GMXLDLIB" ) then
+    if ("${tmppath}" == "") then
+      set tmppath = "$i"
+    else
+      set tmppath = "${tmppath}:$i"
+    endif
+  endif
 end
 setenv LD_LIBRARY_PATH $tmppath
 
index fef40840b0f6c99a79f9bc742f41332bef1359ea..87d0ae533006f27fbfa537a54619625166271e0c 100644 (file)
@@ -8,8 +8,12 @@
 tmppath=""
 for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
   if test "$i" != "$GMXLDLIB"; then
+    if test ${tmppath} == ""; then
+      tmppath=$i
+    else
     tmppath=${tmppath}:$i
   fi
+  fi
 done
 LD_LIBRARY_PATH=$tmppath