Commit Graph

27 Commits

Author SHA1 Message Date
Markus Blatt
819a28a94d Make sure USE_SUPERLU is defined when calling FindSuperLU.cmake
Previously, touching CMakeLists.txt after a first compilation would
trigger compile errors as the two CMake runs were done with
inconsistent parameters (first one without USE_SUPERLU defined and
second one with -DUSE_SUPERLU=ON). Of course that meant that the
options would also differ from module to module, which seems like a
recipe for desaster.

This patch fixes this by moving the definition of the USE_SUPERLU
option to OpmInit.cmake which is included very early in the top most
CMakeLists.txt of each module.

Closes OPM/opm-simulators#3908
2022-06-09 12:26:56 +02:00
Markus Blatt
2f726690e7 Always build with MPI and search for SuperLU and Quadmath.
Concerning MPI, both DUNE and OPM must be compiled with the
same default. For DUNE that is to used MPI if it is found.
With the previous default Cmake in opm-grid would fail for
DUNE 2.8

Even if SuperLU is found umfpack will be used as the coarse
solver for AMG. But if dune-fem is used  that will need SuperL
if it is on the system otherwise linking will fail for DUNE 2.8

Quadmath is used by dune-fem if it is found and linking of flow
will fail in this case for DUNE 2.8 if we did not search for it.
2022-04-20 17:31:23 +02:00
Markus Blatt
77050e5042 Moved settings of CMake_STANDARD stuff to OPMInit.cmake
That makes it usable from *prereqs and helps preventing
multiple -std=c++xx options when compiling (at least for
pybind11)
2021-03-18 15:06:00 +01:00
Arne Morten Kvarving
64cbbdde65 add a cmake flag to disable warnings 2020-06-09 15:11:44 +02:00
Markus Blatt
742d8943ca Move policy settings to OpmInit and into a macro OpmSetPolicies().
OpmInit.cmake is one of the first includes and most importantly before
the opm-*-prereqs.cmake files are include. The macro is needed to make
the policies set in all CMakefiles. OpmSetPolicies should be called in
the toplevel CMakeLists.txt file.

This fixes a lot of warnings experienced in downstream modules that
got triggered by the opm-*-prereqs.cmake files. At some calls the
policies were at other not.

On the other hand new warnings about soon to be deprecated policies
CMP0026 and CMP0048 appear at least for cmake version 3.13.4.
But that should be fixed in another PR.
2020-04-15 14:17:53 +02:00
Markus Blatt
c7e70da2c5 Do not call project another time in OpmLibMain
Each project should and does this in their own top level
CMakeLists.cmake at the very beginning anyway.
2020-04-02 19:44:32 +02:00
Arne Morten Kvarving
2b5a21085c fixed: guess -std=c++17 flag if cmake version is too old
to aid compilation on rhel6
2020-02-17 11:30:26 +01:00
Arne Morten Kvarving
d8aae55837 changed: remove the CXX11Features module
instead use standard CMake mechanism to set cxx standard to 17
move some of the tests to a OpmCompilerChecks.cmake file
2020-02-10 11:36:56 +01:00
Arne Morten Kvarving
7c15d79a93 changed: run tests in parallel with the 'check' target 2019-08-13 12:35:12 +02:00
Arne Morten Kvarving
8d59054112 fixed: make sure not to re-add static analysis tests 2019-07-09 09:49:16 +02:00
Arne Morten Kvarving
535d7df784 changed: add targets for tests even if BUILD_TESTING is off
we still want to be able to build them, just not by default.
ref 'make check' and 'make test-suite'.
2018-02-13 14:10:18 +01:00
Arne Morten Kvarving
d0fa9ce9dc changed: remove hack for dunecontrol+autotools compatibility
all supported dune versions have cmake builds which should be used
2018-01-22 11:06:36 +01:00
Arne Morten Kvarving
de7f4e168d fixed: we need to do mpi disabling earlier
if not, prereqs do not see this file, and the option ends
up not being operational for prereqs looking for MPI.
2018-01-17 15:57:16 +01:00
Arne Morten Kvarving
9737538708 changed: get rid of find modules for opm modules
use pure config mode.

we no longer compile a test application for the libraries,
however checks have been tightened by making sure version of
all opm modules are the same.

this allows for putting prereqs directly in the module repositories
2017-12-20 11:12:01 +01:00
Arne Morten Kvarving
8c9776688d add option to enable PETSc
disabled by default
2017-09-10 06:18:48 +02:00
Arne Morten Kvarving
e3ff47dd9f changed: add option to disable superlu
make this default to off.

additionally, check that the found superlu version
is compatible with the dune-istl version in use.
in particular superlu5 is not compatible with dune-istl 2.4
2017-08-21 16:49:47 +02:00
Arne Morten Kvarving
cdbcb74e5e add static analysis support to buildsystem 2017-06-02 10:38:54 +02:00
Arne Morten Kvarving
481d416c22 remove libtool archive generation 2017-02-23 14:13:49 +01:00
Arne Morten Kvarving
ea86d58ea5 Merge pull request #114 from andlaus/misc_fixes
Misc fixes
2016-05-11 13:53:56 +02:00
Robert Kloefkorn
bead5d2e99 Added -pthread by default if threads are found. USE_PTHREAD is ON and can be turned OFF
to disable this feature.
2016-05-10 11:19:53 +02:00
Andreas Lauser
c3cfe38f0c prevent cmake from warning about CMP0054
we set that policy to NEW because the old behavior is simply insane
for the sake of "convenience" (IMO).
2016-05-05 20:12:57 +02:00
Arne Morten Kvarving
5c7ea4a2eb Merge pull request #25 from akva2/add_ert_python
Look for python module in ERT
2015-07-15 15:37:03 +02:00
Arne Morten Kvarving
afcf0d2917 changed: declare check target before calling test hook
in order for test hook to be able to add dependencies to the target
2015-07-15 15:00:16 +02:00
Arne Morten Kvarving
6ecf5313aa added: support ADDITIONAL_SOURCE_FILES
use this for for non-abandoned programs which should
not be built by the default target
2015-06-29 14:28:45 +02:00
Arne Morten Kvarving
d8ce071287 added: check-commits target 2015-05-28 10:08:46 +02:00
Arne Morten Kvarving
9457be93c0 added: macro to add a single unit test
adapted from EwomsAddTest
2015-05-26 12:34:22 +02:00
Joakim Hove
c78f9d3862 Added cmake/ directory from opm-core 2015-03-18 14:48:36 +01:00