Commit Graph

332 Commits

Author SHA1 Message Date
Andreas Lauser
77e7ed97c9 remove the dependency on boost::iostreams if it is not used
as far as I can see, it is not used in any module except opm-upscaling
and it caused the configure stage to fail if I tried to use with a
self-compiled boost 1.60 (which I have to do in order to use clang on
any modern linux distribution.)
2016-02-25 16:40:59 +01:00
Alf Birger Rustad
005b2d2df4 Merge pull request #71 from akva2/fix_sibling_build_thing
fixed: workaround if() bug in cmake
2016-02-08 12:00:35 +01:00
Joakim Hove
05e319b62e Added probe for sibling find of utilxx/include. 2016-02-04 12:40:03 +01:00
Joakim Hove
8b6fb56e84 Simplified FindERT module 2016-02-04 12:40:03 +01:00
Arne Morten Kvarving
531449951d fixed: workaround if() bug in cmake
seems you cannot rely on the NOTFOUND postfix for compound if's
2016-02-03 14:44:53 +01:00
Joakim Hove
10213b025c Merge pull request #66 from joakim-hove/create-lib
Create library in opm-common
2016-02-02 10:06:16 +01:00
Joakim Hove
c8e8be6db9 Added library opm-common with DataContainer. 2016-02-01 10:33:34 +01:00
Robert Kloefkorn
40573e6c57 Finddune-alugrid: switch order of appearance. 2016-01-28 13:42:55 -07:00
Robert Kloefkorn
1269d918a2 Finddune-alugrid: find the package when build with cmake or autotools (libs differ) 2016-01-28 13:27:45 -07:00
Joakim Hove
4b16c76d2d Added opmcommon library in Findopm-common. 2016-01-26 13:29:27 +01:00
Andreas Lauser
9cd4a79b87 hack around CMake policy CMP00054
newer versions of cmake (mine is 3.2.2) complain about policy CMP00054:

```
CMake Warning (dev) at /home/and/src/opm-common/cmake/Modules/ConfigVars.cmake:30 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "FILE" will no longer be dereferenced when the policy
  is set to NEW.  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  /home/and/src/opm-common/cmake/Modules/OpmLibMain.cmake:173 (configure_vars)
  CMakeLists.txt:109 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.
```

since I'm pretty sure that the old behaviour was not intended here,
fix this for older versions of cmake as well (by adding a prefix so that
CMake does not interpret "FILE" as a variable.)
2015-11-17 17:36:11 +01:00
Atgeirr Flø Rasmussen
8fefe29e7c Merge pull request #58 from andlaus/fix_alugrid_libs
adapt Finddune-alugrid.cmake to the "paramerge" branch of dune-alugrid
2015-11-09 13:13:41 +01:00
Atgeirr Flø Rasmussen
9a615468c5 Merge pull request #60 from atgeirr/improve-useversion
Improve the UseVersion module.
2015-10-23 13:37:38 +02:00
Atgeirr Flø Rasmussen
6e1efc79af Improve the UseVersion module.
The changes are:
 - Add new macros PROJECT_VERSION_NAME and PROJECT_VERSION_HASH
   in addition to the existing PROJECT_VERSION.
 - Add header include guards.
2015-10-23 10:59:08 +02:00
Atgeirr Flø Rasmussen
e5f0fd70bb Do not use REALPATH for OPM_DATA_ROOT.
This caused trouble when the PROJECT_SOURCE_DIR is a
symlink. When 'b' is a symlink, 'a/b/../' is not the same as 'a',
but that is exactly what REALPATH does. In this case, it means that
the opm-data is found (at ../ relative to the symlink), but the path
that is set does not point to it.
2015-10-21 21:59:45 +02:00
Andreas Lauser
aebc12a227 adapt Finddune-alugrid.cmake to the "paramerge" branch of dune-alugrid 2015-10-21 17:58:58 +02:00
Arne Morten Kvarving
f2c14be3be fixed: also check lower-case module variable 2015-10-07 12:59:45 +02:00
Joakim Hove
242f2d1e92 opm-common is REQUIRED
After moving the headers to enable and disable external warnings to
opm-common, opm-common has become a required dependency for
dune-cornerpoint, opm-autodiff and opm-core.
2015-10-06 12:17:21 +02:00
Joakim Hove
e99d3b811e Findopm-common : find warning suppression header. 2015-10-04 17:36:08 +02:00
Bård Skaflestad
7f6d6ec256 Reference correct variable in source-file auto-detection
Commit f638ee8 contained a last-minute, untested change that caused
downstream build failures.  Reference the correct variable,

    PROJECT_SOURCE_DIR

in place of the non-existent CMAKE_PROJECT_SOURCE_DIR.

Pointy hat: Bard.Skaflestad@sintef.no
2015-10-01 13:46:29 +02:00
Bård Skaflestad
f638ee8a15 Use full path to auto-detected sources
This is a work-around for an issue that presented when switching
module opm-material's test framework to using the opm_add_test macro
with automatically detected sources.  The macro would not find any
source files and subsequently end up effectively calling

    add_executable("${CURTEST_EXE_NAME}")

which promts CMake to respond with "incorrect number of parameters".

There may be other, more fundamental, problems here, but this does
at least restore the build of module opm-material on the Jenkins CI
system.
2015-10-01 13:29:23 +02:00
Joakim Hove
75b1d1fb41 Added Findopm-data module. 2015-09-22 13:46:15 +02:00
Arne Morten Kvarving
0b321d31ef fixed: we need different paths in installed and in-tree config file
fixes #44
2015-09-21 14:21:21 +02:00
Robert Kloefkorn
6508cc2721 FindParMETIS: when USE_MPI is OFF the FindParMETIS check should not be called.
Otherwise the opm-core module might not build.
2015-09-21 13:50:12 +02:00
Arne Morten Kvarving
9d96a114f7 changed: remove REQUIRED from opm-common until it supplies headers/libraries
a module requires at least headers to be marked as found by the macros
2015-09-16 14:31:29 +02:00
Atgeirr Flø Rasmussen
d141a15524 Merge pull request #38 from akva2/fix_install_mode
Fix install mode
2015-09-14 08:19:20 +02:00
Robert Kloefkorn
0931ee5a08 [ParMETIS] fix metis dependency. 2015-09-10 14:44:49 +02:00
Arne Morten Kvarving
9df2e0adc9 fixed: properly generate config file for opm-common 2015-09-09 16:23:26 +02:00
babrodtk
9e52bd66e8 Removed buggy REQUIRED statements for opm-common 2015-09-08 21:55:13 +02:00
Andreas Lauser
209f8e15d7 rename the remaining occurences of "opm-cmake" to "opm-common" 2015-09-08 15:11:06 +02:00
Andreas Lauser
76f9bdcd9f add CMake Find module for opm-common
this is not yet required, but it will be as soon as c++ code is added
to the repo.
2015-09-08 10:42:46 +02:00
Markus Blatt
74767da544 Remove Duneism of global ALL_PKG_FLAGS.
It is not needed for OPM.
2015-08-25 18:06:00 +02:00
Markus Blatt
4a14e8d5cd [cmake] Add more search paths to find_path with NO_DEFAULT_PATH.
When specifying NO_DEFAULT_PATH, we have to specify include and lib
manually to find the headers and libraries. This commit does this
for FindParMETIS and FindPTScotch
2015-08-25 18:06:00 +02:00
Atgeirr Flø Rasmussen
8ffda9d4f2 Added Scotch library to PT-Scotch libraries list. 2015-08-25 18:00:28 +02:00
Markus Blatt
de76663211 Prevents (PAR)METIS_INCLUDE_DIR-NOTFOUND variables in the include directories.
Previously we added (PAR)METIS_INCLUDE_DIRS to CMAKE_REQUIRED_INCLUDES
even if these directories were not found and set to
(PAR)METIS_INCLUDE_DIR-NOTFOUND. Now we test whether they are found and only
use them in this case.
2015-08-25 18:00:27 +02:00
Markus Blatt
4ece0532a2 Removes debugging output. 2015-08-25 18:00:12 +02:00
Robert Kloefkorn
70e4c0c4d3 Make ewoms find dune-fem. 2015-08-05 18:21:30 +02:00
Joakim Hove
27b22341d9 Changed code for finding ERT Python
- Using standard python 'import ert' and introspection.
 - Using dist-packages (debian) and site-packages (!debian).
 - In separate cmake module FindERTPython.cmake
2015-08-04 13:04:43 +02:00
Arne Morten Kvarving
05bf882dba Merge pull request #28 from andlaus/define_HAVE_TYPE_TRAITS
opm-material: add HAVE_TYPE_TRAITS to config.h
2015-08-04 11:39:44 +02:00
Andreas Lauser
5e30e3a4ab FindParMETIS: use the FindMETIS module to deal with sequential METIS
for me, 4292de413f lead to linker errors
if the sequential metis library was required (and the parallel is not
installed).  see e.g.,

http://www.opm-project.org/CDash/viewBuildError.php?buildid=41290

The reason for this is a partial clash in the variable names which are
used by both modules. With this PR, the FindParMETIS module does not
write to any variables that are prefixed by "METIS_".
2015-08-04 11:32:00 +02:00
Andreas Lauser
9644664e03 configure wrapper: disable the sibling search
if the 'configure' wrapper is used, you will most likely use
dunecontrol. since duncontrol explicitly passes the paths for all the
dependencies, the "convenience" of the sibling search not wanted in
most cases.
2015-08-03 13:28:16 +02:00
Andreas Lauser
6af5c6070b opm-material: add HAVE_TYPE_TRAITS to config.h
dune has a compatibility layer for std::conditional and some versions
of it emit a deprecation warning if the HAVE_TYPE_TRAITS macro is
undefined:

http://opm-project.org/CDash/viewBuildError.php?type=1&buildid=41175
2015-07-29 14:14:25 +02:00
Andreas Lauser
6a3309e27d add opm-material to the prerequisites of opm-core 2015-07-28 17:26:22 +02:00
Markus Blatt
191e8994be Addes a module for finding ParMETIS or the ParMETIS interface of PT-Scotch.
The AMG within dune-istl issues a warning if ParMETIS is not available.
The reason is that it uses ParMETIS or the ParMETIS bindings of PT-Scotch
to redistribute the load on the coarse levels. Even with an installed and
found PT-Scotch we need to adapt the include path and the libraries linked
to make it work.

Therefore this commit adds a module for searching for ParMETIS and activates
it whenever dune-istl is a dependency. With this the warning about missing
ParMETIS for flow_cp vanishes.
2015-07-24 15:30:17 +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
cfd0fa55cb added: look for python module in ERT 2015-07-15 15:00:23 +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
706e49075c changed: refined OpmStaticTargets
- pass on toolchain file
- don't build examples in static directories
- allow non-install mode and custom targets in opm_from_git
- use origin/master to make sure static source trees are built from the
  top should user re-execute the build in an existing build tree
2015-06-30 10:12:03 +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
f747a22d97 added: file for building opm modules static in your build tree
will be used for creating static benchmark executables
2015-06-29 10:11:25 +02:00