If we write a blank value into the cache, we tell CMake that ERT isn't
found and it won't check again. If we delete it from the cache in case
we didn't find the directories, then CMake will run the find module
again the next time we configure. Just probing for directories is cheap
so this is no problem. This allows us to install ERT, do a reconfigure
and it will then be picked up by the build system.
If we find ERT and it doesn't compile properly, a blank value will still
be written, and it won't try again the next time, so you must wipe the
cache if you *upgrade* ERT into a newer and more compatible version.
It gets tiresome to rebuild the project everytime one makes changes to
any of the unit tests. We don't likely publish results based on the
debug code anyway, so tracking the version number there is not such a
pressing issue.
Otherwise, the library may be declared "done" before the version number
process have had any change to touch files it depends upon. This ensures
that the version number is correct before we start building the library.
Akin to config.h, we write project-version.h whenever the VCS sha hash
of the project changes. This file can then be included to embed this
into the project. Since this changes more frequently, we choose another
file than config.h. Care is also taken to not rewrite the header if the
information doesn't change, but the project is rebuilt.
We cannot generate dune.module because that file is read by dunecontrol
before the build starts. It therefore make sense to let it be the
original and let the build system read it instead of duplicating the
This module is a adaption of Andreas Lauser's OpmParseDuneModule
in opm-material, modified to handle the more sparse info provided by
the other modules as well.
It is only used in one place, where it can easily be replaced by its
expansion. The reason for removing it is that it depends on the name
of the project, and I intend to read this using a routine it the very
directory it is including, hence the need for a different approach.
The linker that is used (ld vs. gold for instance) is often hidden
when using the compiler as a front-end (to include the correct
runtime libraries).
These functions enables us to probe the linker version and reports
its finding in the log.
Developers that are working to familiarize themselves with OPM will
probably start out in CMakeLists.txt to figure out where the project
declare its dependencies, thus the list should be referred to from
there instead of inside one of the sub-modules.
The hooks are meant to be project specific, and should therefore
either know their own name or at least have access to a variable with
that name in it.
This file can be included both in the project itself, and also in the
find module for the library, so that the list of dependencies can be
maintained in only one place.
This let you specify a bunch of directory names on the command line
to *all* packages, without getting annoying warnings that they are
defined but not used.
When using LTO, the linker calls back to the compiler to figure out
where a certain symbol is defined. However, in many versions there
is apparently a bug that is triggered if a template in inlined in
both a used library and in the main program, but with different
versions of the compiler. The Boost exception class is particular
prone for this.
Thus, we disable the -lto from the development builds by default;
if anyone wants to test of the behaviour of their own compiler, they
must now explicitly turn on this flag.
If a client generated with duneproject/built with dunecontrol has a
dependency to opm-autodiff, the macros defined in this file is expected
to exist and will be called to search for the opm-autodiff 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.
Fall back to Eigen's BiCGSTAB solver if UMFPACK is not available. The
BiCGSTAB is built into Eigen and consequently always available when
Eigen is found.