Skip to content

WIP: Change the way dune module versions are checked in cmake

Simon Praetorius requested to merge feature/version-config-files into master

Summary

In CMake we parse the dune.module file, extract the dependencies and their versions and perform a manual version check for find_package. This is the second time versions of modules are checked and the way it is implemented is not compatible to dunecontrol, see #173. This MR proposes a different workflow:

  • A dune module knows best to which version it is compatible. Typically, this compatibility is SameMinorVersion.
  • We let cmake automatically generate dune-<module>-config-version.cmake files using write_basic_package_version_file with a specified version compatibility.
  • When configuring a module and when searching for its dependencies, we use find_package(<module> <version>) with just the version string we want to be compatible with.

Closes #173

Merge request reports