From e373e91d862c38d5f4b72e56df4c6110e1c4855a Mon Sep 17 00:00:00 2001 From: kronbichler Date: Fri, 30 Sep 2011 15:39:35 +0000 Subject: [PATCH] Detect TrilinosConfig.cmake file location. git-svn-id: https://svn.dealii.org/trunk@24489 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 105d78665e..73384ace33 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -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) ]) -- 2.39.5