]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use less -W... options when compiling with trilinos to suppress the millions of warni...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 17 Oct 2008 00:19:55 +0000 (00:19 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 17 Oct 2008 00:19:55 +0000 (00:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@17252 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure

index 29ef7d97ef6d39ecb4197650da8cbeebdd8e408f..19840bf58df6591f44665eb73c51a2f5dc494e5d 100644 (file)
@@ -5463,6 +5463,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS, dnl
     DEAL_II_DEFINE_DEAL_II_USE_TRILINOS=DEAL_II_USE_TRILINOS
 
     DEAL_II_CHECK_TRILINOS_SHARED_STATIC
+    DEAL_II_CHECK_TRILINOS_WARNINGS
 
     DEAL_II_EXPAND_TRILINOS_VECTOR="TrilinosWrappers::Vector"
     DEAL_II_EXPAND_TRILINOS_MPI_VECTOR="TrilinosWrappers::MPI::Vector"
@@ -5543,6 +5544,59 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_SHARED_STATIC, dnl
 ])
 
 
+
+dnl ------------------------------------------------------------
+dnl Trilinos has headers that produce tons of warnings when
+dnl used with -W -Wall (which includes -Wunused). Regrettable
+dnl though it may be, these warnings pretty much drown everything
+dnl else and we better disable some of the warnings to enable us
+dnl to see through the clutter.
+dnl
+dnl Usage: DEAL_II_CHECK_TRILINOS_WARNINGS
+dnl
+dnl ------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_TRILINOS_WARNINGS, dnl
+[
+  OLD_CXXFLAGS="$CXXFLAGS"
+
+  AC_MSG_CHECKING(whether we can use -Wno-unused to suppress Trilinos warnings)
+  CXXFLAGS=-Wno-unused
+  AC_TRY_COMPILE([], [;],
+    [
+      AC_MSG_RESULT(yes)
+      CXXFLAGSG="$CXXFLAGSG -Wno-unused"
+    ],
+    [
+      AC_MSG_RESULT(no)
+    ])
+
+  AC_MSG_CHECKING(whether we can use -Wno-overloaded-virtual to suppress Trilinos warnings)
+  CXXFLAGS=-Wno-overloaded-virtual
+  AC_TRY_COMPILE([], [;],
+    [
+      AC_MSG_RESULT(yes)
+      CXXFLAGSG="$CXXFLAGSG -Wno-overloaded-virtual"
+    ],
+    [
+      AC_MSG_RESULT(no)
+    ])
+
+  AC_MSG_CHECKING(whether we can use -Wno-extra to suppress Trilinos warnings)
+  CXXFLAGS=-Wno-extra
+  AC_TRY_COMPILE([], [;],
+    [
+      AC_MSG_RESULT(yes)
+      CXXFLAGSG="$CXXFLAGSG -Wno-extra"
+    ],
+    [
+      AC_MSG_RESULT(no)
+    ])
+
+ CXXFLAGS="${OLD_CXXFLAGS}"
+])
+
+
+
 dnl ------------------------------------------------------------
 dnl Check whether Metis is installed, and if so store the 
 dnl respective links
index 817dcbc34693a6d12446a520e54cc368693c99cf..e70db828dcb3d5599e0586e2af75c545799bed81 100755 (executable)
@@ -12227,6 +12227,167 @@ echo "$as_me: error: When building deal.II with shared libraries, Trilinos also
   fi
 
 
+  OLD_CXXFLAGS="$CXXFLAGS"
+
+  { echo "$as_me:$LINENO: checking whether we can use -Wno-unused to suppress Trilinos warnings" >&5
+echo $ECHO_N "checking whether we can use -Wno-unused to suppress Trilinos warnings... $ECHO_C" >&6; }
+  CXXFLAGS=-Wno-unused
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+      { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+      CXXFLAGSG="$CXXFLAGSG -Wno-unused"
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+      { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+  { echo "$as_me:$LINENO: checking whether we can use -Wno-overloaded-virtual to suppress Trilinos warnings" >&5
+echo $ECHO_N "checking whether we can use -Wno-overloaded-virtual to suppress Trilinos warnings... $ECHO_C" >&6; }
+  CXXFLAGS=-Wno-overloaded-virtual
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+      { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+      CXXFLAGSG="$CXXFLAGSG -Wno-overloaded-virtual"
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+      { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+  { echo "$as_me:$LINENO: checking whether we can use -Wno-extra to suppress Trilinos warnings" >&5
+echo $ECHO_N "checking whether we can use -Wno-extra to suppress Trilinos warnings... $ECHO_C" >&6; }
+  CXXFLAGS=-Wno-extra
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+      { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+      CXXFLAGSG="$CXXFLAGSG -Wno-extra"
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+      { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ CXXFLAGS="${OLD_CXXFLAGS}"
+
+
     DEAL_II_EXPAND_TRILINOS_VECTOR="TrilinosWrappers::Vector"
     DEAL_II_EXPAND_TRILINOS_MPI_VECTOR="TrilinosWrappers::MPI::Vector"
     DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR="TrilinosWrappers::BlockVector"

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.