We failed to propagate the BOOST_\(.*\)FLAGS -> OPM_BOOST_\1FLAGS fix
(commit 6b57a00) to all clients, notably our own macro for recognising
whether or not the Boost.Test library should be linked dynamically or
statically. This commit remedies that oversight.
Fix a misunderstanding that's been present since the inception. The
LDFLAGS variable is entirely at the builder's disposal. Flags needed
for system-internal settings must go in the AM_* equivalents.
This is an experiment, not strictly sanctioned by the AX_LAPACK macro
documentation, to avoid linker errors related to missing symbol MAIN__
in the (GFortran) run-time support libraries. Strictly speaking, we
should be using the method outlined in the Autoconf manual, but we'll
try the easier way for now.
This commit is more or less equivalent to forward-porting commits
dd6e0fd3, c437eba2, and 9e885dc7 from the "ert" branch.
When OPM-Core is used as a Dune module (e.g., as enabled by commit
789bc5ca7), we stand the risk of creating multiple, conflicting
defintions of crucial <config.h> symbols (e.g. `HAVE_BOOST') and
build variables (e.g., `BOOST_CPPFLAGS' and `BOOST_LDFLAG').
Avoid this situation by prefixing these symbols with an `OPM_'
string such that Dune's `ENABLE_BOOST' solution works as intendend
in modules that are derived in the OPM context.
This allows projects which use the DUNE build system and want to use
OPM-Core to specify a dependency in their dune.module file. (i.e. they
don't have to worry about compiler and linker flags anymore.)
opm-core can still be used without having DUNE installed, though. This
means that for users which do not need/want a dependency on DUNE,
nothing changes.
v2: avoid naming conflict of the AX_BOOST_BASE macro with dune-common
by renaming it to OPM_BOOST_BASE.
v3: make the library detection work nicely
v4: Use AX_BOOST_BASE M4 macro from opm-core instead from dune-common
as base for OPM_BOOST_BASE to get rid of a few bugs, reworded
commit message. Thanks to Bård Skaflestad for the review.
We do not want to distribute the AGMG sources along with OPM-Core.
These sources must be defined by the builder at configure time.
This fixes "make distcheck".
This allows projects which use the DUNE build system and want to use
OPM-Core to specify a dependency in their dune.module file. (i.e. they
don't have to worry about compiler and linker flags anymore.)
opm-core can still be used without having DUNE installed, though. This
means that for users which do not need/want a dependency on DUNE,
nothing changes.
v2: avoid naming conflict of the AX_BOOST_BASE macro with dune-common
by renaming it to OPM_BOOST_BASE.
v3: make the library detection work nicely
v4: Use AX_BOOST_BASE M4 macro from opm-core instead from dune-common
as base for OPM_BOOST_BASE to get rid of a few bugs, reworded
commit message. Thanks to Bård Skaflestad for the review.
Use result of OPM_DYNLINK_BOOST_TEST to determine whether or not to
#define the Boost symbol BOOST_TEST_DYN_LINK .
While here, replace an unprintable character with the proper UTF-8
encoding in a comment.
Details:
Test suites based on Boost.Test must know how to include the library
support code into the executables. If the Boost.Test library is
dynamically linked, then test suites must define the pre-processor
symbol "BOOST_TEST_DYN_LINK". Otherwise, this symbol must *not* be
defined.
Resolution:
Introduce a new Autoconf macro, OPM_DYNLINK_BOOST_TEST, that defines a
secondary symbol--HAVE_DYNAMIC_BOOST_TEST--if the local computer system
uses dynamic linking. Test suites (e.g., tests/param_test.cpp) may then
inspect this symbol to determine whether or not to #define
BOOST_TEST_DYN_LINK.
Call the macro from "configure.ac".
Suggested by: Joakim Hove
Conflicts:
opm/core/grid/cpgpreprocess/geometry.c
Defer printing diagnostic message concerning negative cell volumes
until we're absolutely sure that the volume actually *is*
negative. Since we're now accumulating signed volumes, some of
the initial contributions might be negative but the end result
likely won̈́'t be.
This merge also brings feature parity with the MATLAB Reservoir
Simulation Toolbox.