diff --git a/cmake/modules/DuneEnableAllPackages.cmake b/cmake/modules/DuneEnableAllPackages.cmake index 469e71b0791080d6a2de96c0b699927584f5ceb8..7addebe26d3b4197edf877f90e632dd877496b9c 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)