]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Detect TrilinosConfig.cmake file location.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 30 Sep 2011 15:39:35 +0000 (15:39 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 30 Sep 2011 15:39:35 +0000 (15:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@24489 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4

index 105d78665e0a31d180710e79963c6065b7a467c3..73384ace334261dbbcc343b39c6bcd6f96f3188a 100644 (file)
@@ -6522,10 +6522,18 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_LIBS, dnl
 
   dnl Trilinos' cmake invokation stores the set of libraries
   dnl in a special file for consumption of cmake at a later
-  dnl time. We'll simply grep through it
-  DEAL_II_TRILINOS_LIBS="`grep Trilinos_LIBRARIES $DEAL_II_TRILINOS_INCDIR/TrilinosConfig.cmake \
-    | perl -pi -e 's/.*\"(.*)\".*/\1/g; s/;/ /g;'`"
-  AC_MSG_RESULT([$DEAL_II_TRILINOS_LIBS])
+  dnl time. We'll simply grep through it. Unfortunately, it has
+  dnl changed place in Trilinos starting from version 10.8.0, so 
+  dnl manually detected prior version
+  if test "$DEAL_II_TRILINOS_VERSION_MAJOR" = 10 -a "$DEAL_II_TRILINOS_VERSION_MINOR" -lt 8 ; then
+    DEAL_II_TRILINOS_LIBS="`grep Trilinos_LIBRARIES $DEAL_II_TRILINOS_INCDIR/TrilinosConfig.cmake \
+      | perl -pi -e 's/.*\"(.*)\".*/\1/g; s/;/ /g;'`"
+    AC_MSG_RESULT([$DEAL_II_TRILINOS_LIBS])
+  else
+    DEAL_II_TRILINOS_LIBS="`grep Trilinos_LIBRARIES $DEAL_II_TRILINOS_LIBDIR/cmake/Trilinos/TrilinosConfig.cmake \
+      | perl -pi -e 's/.*\"(.*)\".*/\1/g; s/;/ /g;'`"
+    AC_MSG_RESULT([$DEAL_II_TRILINOS_LIBS])
+  fi
   AC_SUBST(DEAL_II_TRILINOS_LIBS)
 ])
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.