From 22dc9e60660727cfb00a290aef3346c4d0dd25a0 Mon Sep 17 00:00:00 2001
From: Simon Praetorius <simon.praetorius@tu-dresden.de>
Date: Wed, 12 Jan 2022 15:11:23 +0100
Subject: [PATCH] Cleanup the repository after 2.9 changes

---
 CMakeLists.txt                                   | 7 +------
 README                                           | 6 +++---
 cmake/modules/CMakeLists.txt                     | 3 ---
 cmake/modules/DuneScalarbasisMacros.cmake        | 1 -
 dune.module                                      | 4 ++--
 dune/functions/functionspacebases/scalarbasis.hh | 1 +
 src/poisson.cc                                   | 1 -
 src/stokes.cc                                    | 1 -
 8 files changed, 7 insertions(+), 17 deletions(-)
 delete mode 100644 cmake/modules/CMakeLists.txt
 delete mode 100644 cmake/modules/DuneScalarbasisMacros.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c632e92..8f8461d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,4 @@
-# We require version CMake version 3.1 to prevent issues
-# with dune_enable_all_packages and older CMake versions.
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.13)
 project(dune-scalarbasis CXX)
 
 if(NOT (dune-common_DIR OR dune-common_ROOT OR
@@ -20,12 +18,9 @@ include(DuneMacros)
 # start a dune project with information from dune.module
 dune_project()
 
-dune_enable_all_packages()
-
 add_subdirectory(src)
 add_subdirectory(dune)
 add_subdirectory(doc)
-add_subdirectory(cmake/modules)
 
 # finalize the dune project, e.g. generating config.h etc.
 finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
diff --git a/README b/README
index b7f6577..06718db 100644
--- a/README
+++ b/README
@@ -4,7 +4,7 @@ Preparing the Sources
 Additional to the software mentioned in README you'll need the
 following programs installed on your system:
 
-  cmake >= 2.8.12
+  cmake >= 3.13
 
 Getting started
 ---------------
@@ -31,9 +31,9 @@ An example options file might look like this:
 
 #use this options to configure and make if no other options are given
 CMAKE_FLAGS=" \
--DCMAKE_CXX_COMPILER=g++-5 \
+-DCMAKE_CXX_COMPILER=g++-7 \
 -DCMAKE_CXX_FLAGS='-Wall -pedantic' \
--DCMAKE_INSTALL_PREFIX=/install/path" #Force g++-5 and set compiler flags
+-DCMAKE_INSTALL_PREFIX=/install/path" #Force g++-7 and set compiler flags
 
 If you save this information into example.opts you can pass the opts file to
 dunecontrol via the --opts option, e. g.
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
deleted file mode 100644
index 57484ea..0000000
--- a/cmake/modules/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-set(modules "DuneScalarbasisMacros.cmake")
-
-install(FILES ${modules} DESTINATION ${DUNE_INSTALL_MODULEDIR})
diff --git a/cmake/modules/DuneScalarbasisMacros.cmake b/cmake/modules/DuneScalarbasisMacros.cmake
deleted file mode 100644
index 613dfb6..0000000
--- a/cmake/modules/DuneScalarbasisMacros.cmake
+++ /dev/null
@@ -1 +0,0 @@
-# File for module specific CMake tests.
diff --git a/dune.module b/dune.module
index 3f36ab3..f791b76 100644
--- a/dune.module
+++ b/dune.module
@@ -4,7 +4,7 @@
 
 #Name of the module
 Module: dune-scalarbasis
-Version: 0.1
+Version: 2.9-git
 Maintainer: simon.praetorius@tu-dresden.de
 #depending on
-Depends: dune-functions
+Depends: dune-functions (>= 2.9)
diff --git a/dune/functions/functionspacebases/scalarbasis.hh b/dune/functions/functionspacebases/scalarbasis.hh
index 4a272cc..7077816 100644
--- a/dune/functions/functionspacebases/scalarbasis.hh
+++ b/dune/functions/functionspacebases/scalarbasis.hh
@@ -79,6 +79,7 @@ public:
   }
 
   /// \brief Return number of possible values for next position in multi index
+  template<class SizePrefix>
   size_type size(const SizePrefix prefix) const
   {
     assert(prefix.size() == 0 || prefix.size() == 1);
diff --git a/src/poisson.cc b/src/poisson.cc
index 7acf042..fd1afba 100644
--- a/src/poisson.cc
+++ b/src/poisson.cc
@@ -5,7 +5,6 @@
 #include <array>
 #include <vector>
 
-#include <dune/common/function.hh>
 #include <dune/common/indices.hh>
 
 #include <dune/geometry/quadraturerules.hh>
diff --git a/src/stokes.cc b/src/stokes.cc
index 139c428..a383f8d 100644
--- a/src/stokes.cc
+++ b/src/stokes.cc
@@ -5,7 +5,6 @@
 #include <array>
 #include <vector>
 
-#include <dune/common/function.hh>
 #include <dune/common/indices.hh>
 
 #include <dune/geometry/quadraturerules.hh>
-- 
GitLab