6608bc87e4178eef3c43f3fe166bd58a72af1f14
Otherwise we are running into weired problems as downstream modules
refuse to set the version information correctly. This leads to
unset DUNE_MODULE_VERSION_{MINOR,MAJOR,REVISION} in config.h.
This only happened for dune-istl which was first requested by opm-core
but that module did not set the version information. Opm-grid requested
it, too. But this time this information was not correctly put into
opm-grid-config.cmake leading to erroneous checks like:
if (DEFINED DUNE_ISTL_VERSION_MAJOR AND NOT "${DUNE_ISTL_VERSION_MAJOR}" STREQUAL "")
message (WARNING "Incompatible value \"${DUNE_ISTL_VERSION_MAJOR}\" of variable \"DUNE_ISTL_VERSION_MAJOR\"")
endif ()
Note there should have been a number instead of an empty string. The version
numbers were also undefined in config.h of opm-grid. Same picture for opm-simulators.
My assumption is that for these modules Finddune-istl.cmake was implicitly included
when searching for opm-core. That module sets the version in the parent scope only
which might cause this problem. I am not sure though.
With this commit the version is always added to CONFIG_VARS for the first most upstream
OPM module that requests a dune module. This fixes the issue at least for me on my system.
Also note that this problem did not occur in all configurations. I experienced breaking
builds with the installed dune module 2.4.1 of Debian backports while using dunecontrol.
The warnings about unmatching versions happened with uninstalled 2.3, too.
Languages
C++
79%
ECL
13.4%
Scheme
3.1%
CMake
2.4%
Python
1%
Other
1%