If a client generated with duneproject/built with dunecontrol has a
dependency to opm-core, the macros defined in this file is expected
to exist and will be called to search for the opm-core library.
All that is done here is to use the pkg-config helper module and
import the configuration that was written by the CMake system (which
even may have been called earlier in the same dunecontrol "session")
Pkg-config files are written as part of the CMake configuration, and
these can be imported into AutoTools-driven projects to get the correct
compiler and linker options that has been probed.
This module sets individual flags for each feature; there is not one
"CXX11Features_FOUND" flags which is set. Thus, when putting the
module as REQUIRED, the only consequence is that we cannot disable
searching for it.
Instead, we make it optional, meaning that the flags won't get set if
it isn't included and the dependent modules will adjust accordingly.
In CMake "canon" (i.e. tutorial on Kitware's website) it is stated that
the _DIR suffix should be used for the directory of the library alone,
whereas _DIRS are entire list of paths necessary to compile (i.e.
dependencies are included).
Eigen3 only uses the singular form (since it doesn't have any
dependencies); it should really be copied to the plural form, but it may
be advantageous to have the find-module included unchanged, so we put in
an extra effort to find it here.
Template functions must be defined in the header since the library
cannot contain generic code. To keep only the interface in the main
header, all such function bodies are put in a separate _impl file.
Since a definition of the class is not in the header, no other
compilation units can safely access the internals of the Impl class
anyway, so it may as well be a regular struct so that the outer class
(SimulatorIncompTwophase) can access it.
If dune-grid has been compiled with _GLIBCXX_DEBUG, linking the test
program will fail since probing doesn't get the flags that are specified
for the main project, and thus configuration halts. Instead, we use a
smaller test program which doesn't need proper STL linkage to compile
and link.
Notice that this definition specifies a superset of the actual format
as the ParameterGroup tag is context-dependent (which cannot be captured
by DTD schemata).