From ae495d90c356e6a3d45145ba974c989418f1e80b Mon Sep 17 00:00:00 2001
From: Rene Milk <rene.milk@uni-muenster.de>
Date: Thu, 25 Oct 2012 15:57:40 +0200
Subject: [PATCH] disable tests/examples for non-existant modules

---
 dune/stuff/common/math.hh   | 2 +-
 dune/stuff/common/ranges.hh | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dune/stuff/common/math.hh b/dune/stuff/common/math.hh
index 9cf42afd4..c41d525f0 100644
--- a/dune/stuff/common/math.hh
+++ b/dune/stuff/common/math.hh
@@ -33,7 +33,7 @@ namespace boost {
 namespace math {
 //! isinf specialization for Dune::StraightenBlockVector
 template <class BlockVectorImp, class DofImp>
-#if DUNE_VERSION_NEWER(DUNE_FEM, 1, 4)
+#if DUNE_VERSION_NEWER(DUNE_FEM, 1, 5)
 inline bool isinf(const Dune::Fem::StraightenBlockVector<BlockVectorImp, DofImp>& x)
 {
 #else
diff --git a/dune/stuff/common/ranges.hh b/dune/stuff/common/ranges.hh
index eb20974f6..952417c65 100644
--- a/dune/stuff/common/ranges.hh
+++ b/dune/stuff/common/ranges.hh
@@ -10,7 +10,8 @@
 #include <dune/grid/common/gridview.hh>
 #include <boost/serialization/static_warning.hpp>
 
-#ifdef HAVE_DUNE_FEM
+#if HAVE_DUNE_FEM
+#include <dune/fem/version.hh>
 #include <dune/fem/function/common/discretefunction.hh>
 #include <dune/fem/gridpart/common/gridpart.hh>
 #endif
@@ -19,7 +20,7 @@
 namespace std {
 
 
-#ifdef HAVE_DUNE_FEM
+#if HAVE_DUNE_FEM
 
 template <class DiscreteFunctionTraits>
 auto begin(const Dune::DiscreteFunctionInterface<DiscreteFunctionTraits>& func) -> decltype(func.dbegin())
@@ -143,7 +144,7 @@ intersectionRange(const Dune::GridView<GridViewTraits>& gridview,
                            typename Dune::GridView<GridViewTraits>::template Codim<0>::Entity>(gridview, entity);
 }
 
-#ifdef HAVE_DUNE_FEM
+#if defined(HAVE_DUNE_FEM) && HAVE_DUNE_GRID
 
 template <class GridPartTraits>
 IntersectionRange<Dune::GridPartInterface<GridPartTraits>,
-- 
GitLab