DuneMacros.cmake: find_dune_package version check differs from version check in dunecontrol
While looking at dune-localfunctions!117 we noticed that our buildsystem implements two different version checks:
- dunecontrol uses
- cmake has a version check in
These version checks differ in several ways:
- dunecontrol allows multiple constraints (e.g.
dune-common (>= 2.7 && < 2.8)), cmake only one
- dunecontrol implements
>=; cmake only the last three
In particular the comparison introduced in dune-localfunctions!117 is only parsed as
dune-common (>= 2.7) in cmake; it also fails if additional whitespace is added (i.e.
dune-common (>=2.7&&<2.8) works, but
dune-common (>= 2.7 && < 2.8) results in a cmake error)