Skip to content
Snippets Groups Projects
Commit 525b7039 authored by Steffen Müthing's avatar Steffen Müthing
Browse files

[CMake] Require CMake 2.8.12 for dune_enable_all_packages()

dune_enable_all_packages has to update the compiler options, but the
command compile_options only exists in CMake 2.8.12+. So we add a hard
requirement for that CMake version to the function.

I only ever intended this feature to work for CMake >= 2.8.12, so this
doesn't really change anything, except for giving the users a more
useful diagnostic.
parent e51e1ae4
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,16 @@ endfunction(dune_register_package_flags)
function(dune_enable_all_packages)
if (CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "dune_enable_all_packages() needs CMake 2.8.12+")
elseif(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
message(WARNING
"You are using dune_enable_all_packages().
This requires at least CMake 2.8.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()
include(CMakeParseArguments)
set(OPTIONS APPEND VERBOSE)
set(SINGLEARGS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment