Commit Graph

365 Commits

Author SHA1 Message Date
Robert Kloefkorn
8de70f9128 [bugfix][cmake] Fix FindParMETIS check by adding missing
include(CheckIncludeFile).
2020-03-10 15:33:29 +01:00
Arne Morten Kvarving
989d643140 Merge pull request #1509 from blattms/fix-g++-versioncheck-fs
Fix compiler version check for -lstdc++fs
2020-02-25 08:55:07 +01:00
Markus Blatt
31e6f316db Fix compiler version check for -lstdc++fs
There was a typo in the if condition which probably always
made it true. Linking to to -lstdc++fs is needed until
g++-9, see e.g. https://gitlab.kitware.com/cmake/cmake/issues/17834
2020-02-24 22:00:10 +01:00
Arne Morten Kvarving
f76daabbb4 changed: disable building of test suite if Boost::test is not found 2020-02-19 12:25:32 +01: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
fb75bcd4e2 changed: use std::filesystem instead of boost::filesystem
since we still support g++-7, where filesystem is marked experimental,
we introduce a wrapper header and expose the namespace to use
as Opm::filesystem.

for gcc we unconditionally link with libstdc++fs in the python bindings.
the setup.py stuff links as c code, not c++ code, so it is not
automatically added on any gcc version. this might prove unportable
later.
2020-02-13 12:34:19 +01:00
Arne Morten Kvarving
44f2af0589 changed: do not mess with flags in config file
abi is ensured in other ways now
2020-02-10 11:45:06 +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
247b5685cc remove libecl from buildsystem, jenkins and packaging 2019-10-16 20:03:08 -05:00
Markus Blatt
a862c14873 Allow building a module with dependencies installed but source lying around.
If you set CMAKE_INSTALL_PREFIX, have the dependencies installed there, but
the source of them lying around in the parent directory of the build
directory, then the build will fail starting with opm-models because
we assume that ../opm-material is a build directory and set opm-material_DIR
to it. CMake will complain about not finding opm-material-config.cmake or
Opm-materialConfig.cmake. With this commit we will only set opm-material_DIR
if the directory contains a file CMakeCache.txt (which should be the case in
a configured build directory.

Directory outline of the failing situation is
- ${CMAKE_INSTALL_PREFIX} # where all dependencies are installed
- parent_dir
|____ opm-common #source dir
|____ opm-material #source dir
|____ ...
|____ build #build directory for current module (e.g. opm-modules)

Change is tested with sibling build

- build
|___ opm-common #build dir
|___ opm-material #build dir
|___ ...

and the dune version of it

- parent_dir
|___ opm-common # source dir
    |____ build # build dir opm-common

|___ opm-material # source dir
    |____ build # build dir opm-material
...
2019-10-16 12:38:51 +02:00
Arne Morten Kvarving
1edf46ffd1 changed: remove ADD_DISABLED_CTEST option
a disabled test is disabled. end of story.
2019-09-09 10:42:29 +02:00
Arne Morten Kvarving
41f18d718c changed: rename ewoms to opm-models 2019-08-23 08:29:28 +02: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
a1edb0a1f7 changed: simplify by using built-in support
use built-in support to obtain number of processor cores
instead of custom osx and linux code.
2019-08-13 11:33:43 +02:00
Arne Morten Kvarving
3e078e76b1 fix indenting 2019-07-09 14:39:11 +02:00
Arne Morten Kvarving
43c504593f added: static analysis for targets added using opm_add_test 2019-07-09 10:35:40 +02:00
Arne Morten Kvarving
3e576b6332 added: support object libraries in static analysis macro 2019-07-09 10:35:40 +02:00
Arne Morten Kvarving
748fd20e57 fixed: make sure path is absolute before attempting conversion to relative 2019-07-09 10:35:40 +02:00
Arne Morten Kvarving
8d59054112 fixed: make sure not to re-add static analysis tests 2019-07-09 09:49:16 +02:00
Atgeirr Flø Rasmussen
4de0a7e9e3 Turn on -Wextra and -Wshadow warning flags. 2019-06-25 11:18:47 +02:00
Andreas Lauser
f700053736 opm_add_test(): add condition to specify if a test ought to be compiled by default
this argument is optional and called *drumroll* `DEFAULT_ENABLE_IF`.
2019-03-07 12:44:28 +01:00
Arne Morten Kvarving
199b7d710a fixed: set property for correct test name 2018-11-07 11:33:31 +01:00
Arne Morten Kvarving
d60787188e fixed: simplify boost_dyn_test code and add to opm_add_test as well 2018-11-07 11:33:31 +01:00
Joakim Hove
f279c7e374 Fixed ALBERTA_FOUND to OFF when not found 2018-10-15 09:42:13 +02:00
Markus Blatt
22b38f1031 Also search for Alberta
We do not use it in OPM, but for whatever reason I was experiencing
linker errors (unresolved symbol) when compiling ebos with DUNE 2.6
and g++-8.2. dune-grid exports its alberta wrapper libraries in dune-grid_LIBRARIES. Previously this did not pose a problem. Somehow it does now. If
I strip the libraries from the linker line everything is fine but this
is not a good solution.

Therefore I have added a test for Alberta that is triggered by the test of
dune-grid.
2018-09-27 15:05:04 +02:00
Arne Morten Kvarving
fa85844a9b Merge pull request #500 from akva2/bash_completion
added: cmake glue for adding bash tab completion for an installed product
2018-09-25 12:32:03 +02:00
Arne Morten Kvarving
564f064392 added: cmake glue for adding bash tab completion for an installed product 2018-09-25 12:31:11 +02:00
Roland Kaufmann
d847e10d96 Do not warn if just def'ed HAVE_ vars are set to 1
Some configuration scripts probe and just set HAVE_FOO without any
values, whereas others set it explicitly to 1. If these two are mixed,
for instance that the same package is used by two of our prerequisites,
but in different manner, then we get compatibility warnings when we try
to run the configuration script, even though there is no real conflict.

dune-fem, dune-alugrid and dune-localfunctions have this problem (around
release 2018.04).

This patch special-code the test so if the old value was previously
either just defined or explicitly set to the value 1, a warning will not
be issued if then suddenly the other variant is used.
2018-09-21 13:49:39 +02:00
Joakim Hove
90459cac7e Add quotes to ensure string evaluation 2018-09-19 23:33:54 +02:00
Arne Morten Kvarving
4c6d4ee201 Merge pull request #498 from joakim-hove/komodo
Komodo: cmake config changes
2018-09-19 09:08:53 +02:00
Joakim Hove
906ff3f4b5 Add ability to CMAKE variable DIST_PREFIX before find_package(opm--) 2018-09-19 09:07:05 +02:00
Joakim Hove
238d3ddb58 Move CMAKE_MODULE_PATH manipulations before @OPM_PROJECT_EXTRA_CODE@ 2018-09-17 09:12:29 +02:00
Arne Morten Kvarving
d58001f608 improve lto support
need to use the wrappers for ar and ranlib, or static
libraries are problematic.
2018-09-14 10:29:59 +02:00
Alf Birger Rustad
0183fa884a Make compiling with OpenMP default. 2018-08-17 13:39:44 +02:00
Arne Morten Kvarving
0627a9f8ef added: strip test_ prefix from tests added with opm_add_test 2018-08-03 09:58:59 +02:00
Markus Blatt
4a5333887b Research for software if we search for COMPONENTS.
Otherwise we will never search for e.g. Boost multiple
times and the upmost module in the hierarchy will dictate
the components to be used. That does not work for downstream
modules.

Therefore with this change we check whether there is an argument
COMPONENTS passed to find_package and make sure there will be
another call to it if that is the case.
2018-07-13 16:10:32 +02:00
Markus Blatt
563c053d3a Set only ecl_LIBRARIES and nothing else for ecl. 2018-07-12 12:25:21 +02:00
Markus Blatt
cbd44ff67a Remove unneeded opm_common_processed variable.
As we now process the prerequisites in the package configuration file
one search for opm-common is fully sufficient.
2018-07-12 12:25:21 +02:00
Markus Blatt
32dabd6572 Handle prerequisites at the end of package configuration file.
The code in @opm-project_NAME@-prereqs uses macros from OpmPackage.cmake. At
the previous location that file was not yet included for the module opm-common
as this is done in the section @OPM_PROJECT_EXTRA_CODE@, which also sets
CMAKE_MODULE_PATH.
2018-07-12 12:24:43 +02:00
Markus Blatt
3fabf2aad3 Unify handling of package dependency.
There was one macro to do that and one inline code in another
macro. With these changes we always use the macro for this.
2018-07-12 10:45:08 +02:00
Markus Blatt
90cbad1163 Better mark extra code section in opm-project-config.cmake.in 2018-07-06 11:02:50 +02:00
Robert Kloefkorn
13d1ce4fbf [bugfix][Finddune-istl] Add HAVE_SUITESPARSE_UMFPACK for newer dune-istl
versions.
2018-07-02 15:56:03 +02:00
Roland Kaufmann
2356cc35e5 Improve status message when libtool is not present
Libtool uses libtool archive files (.la) to determine how to do a
platform-specific link. To generate these files, it is necessary to have
libtool installed on the system, since it will only accept files with
its own particular version number embedded. If libtool is not installed,
you probably don't need the libtool archive files either, so no .la is
generated. However, the status message sounded like libtool was probed
but not found, and that this was something that you should install.

This patch modifies the status message to make it more clear way libtool
was probed, and what the consequence of a missing libtool is (i.e. no
.la file for you).
2018-06-26 09:22:03 +02:00
Markus Blatt
c6536c0b2f Allow DUNE modules to locate the dune.module files during CMake run.
For this we need to set <dune-module>_PREFIX either to where the module
is installed to or the source directory for a build with uninstalled
modules.
2018-06-18 12:47:53 +02:00
Arne Morten Kvarving
e823b0a93e changed: replace opm-data with new opm-tests repository 2018-03-27 12:09:09 +02:00
Arne Morten Kvarving
726ccd7fd7 Import opm-parser 2018-03-05 10:30:29 +01:00
Markus Blatt
0e25c9f2e9 Always add ecl target to ecl_LIBRARIES.
Otherwise the flow binary does not know the correct
path to libecl in some situations.
2018-03-02 22:15:54 +01:00
Arne Morten Kvarving
cedb010a04 fixed: set the boost dynamic test define if boost::unit_test_framework
is a shared library

additional condition for opm-parser as it forces dyn boost test (not
strictly necessary but it highlights the different behaviour for now)
2018-02-15 07:21:35 +01:00
Arne Morten Kvarving
94f71b730d fixed: prefix created dir with PROJECT_BINARY_DIR to facilitate superbuild 2018-02-13 15:05:49 +01:00
Arne Morten Kvarving
c486e6ebd8 re-add fancy names 2018-02-13 14:10:18 +01:00