From 4254917c67d7fce088149edbd3ef706721500a05 Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.r.kempf@gmail.com>
Date: Tue, 30 Jun 2015 13:24:12 +0200
Subject: [PATCH] Add a warning that some functions are 2.8.12

---
 cmake/modules/DuneEnableAllPackages.cmake | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/cmake/modules/DuneEnableAllPackages.cmake b/cmake/modules/DuneEnableAllPackages.cmake
index 469e71b07..7addebe26 100644
--- a/cmake/modules/DuneEnableAllPackages.cmake
+++ b/cmake/modules/DuneEnableAllPackages.cmake
@@ -240,6 +240,15 @@ endfunction(dune_enable_all_packages)
 
 
 function(dune_target_enable_all_packages)
+  if (CMAKE_VERSION VERSION_LESS 2.8.12)
+    message(FATAL_ERROR "dune_target_enable_all_packages() needs CMake 2.8.12+")
+  elseif(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
+    message(WARNING
+"You are using dune_target_enable_all_packages().
+This requires at least CMake 2.9.12, but your Dune module only requires ${CMAKE_MINIMUM_REQUIRED_VERSION}.
+Update the cmake_minimum_required() call in your main CMakeLists.txt file to get rid of this warning.")
+  endif()
+
   foreach(_target ${ARGN})
 
     get_property(all_incs GLOBAL PROPERTY ALL_PKG_INCS)
-- 
GitLab