Commit Graph

3722 Commits

Author SHA1 Message Date
Roland Kaufmann
73d991adb4 Search for dune.module in private installations
When doing a private install of DUNE libraries, the dune.module file
is put in the lib/ directory, regardless of architecture.

This patch searches the lib/ directory as a catch-all after having
searched the platform-specific directories. This should minimize the
chance of hitting an accidentally unrelated dune.module.
2013-09-20 13:17:38 +02:00
Atgeirr Flø Rasmussen
eea3e3a4e3 Merge pull request #380 from rolk/380_spline
Fix small problems in spline testing code which give build errors
2013-09-20 03:22:31 -07:00
Roland Kaufmann
8faf68dabb Replace int with size_t to avoid possible size mismatch 2013-09-20 10:53:47 +02:00
Roland Kaufmann
cbe232e880 Add missing header include 2013-09-20 10:51:18 +02:00
Atgeirr Flø Rasmussen
dd3c69032d Merge pull request #372 from rolk/372_spill
Update the CMake cache to reflect current settings
2013-09-20 01:51:06 -07:00
Atgeirr Flø Rasmussen
e6d80ae368 Merge pull request #378 from rolk/378_dunemod
Make finding and installing dune.module redux
2013-09-20 01:50:50 -07:00
Roland Kaufmann
b09dd0894b Improve detection of dune.module
Remove lib/.libs/ and lib64/ as well as lib/ to find the prefix for the
installation root.
2013-09-20 09:37:33 +02:00
Roland Kaufmann
e661d18554 Improve troubleshooting for missing dune.module
If the library is found, but dune.module is not, we really should give
an error because the #ifdefs in the code will not work as intended.

Print the locations where we expect the library to appear to the console
for better tracking.
2013-09-20 09:37:33 +02:00
Atgeirr Flø Rasmussen
86d09115b9 Merge pull request #345 from andlaus/import_splines
Import splines
2013-09-19 10:26:02 -07:00
Andreas Lauser
0d0ab3bd5a refactor the spline code: merge everything into one class 2013-09-19 18:48:54 +02:00
Atgeirr Flø Rasmussen
3ef57842a9 Merge pull request #376 from rolk/376_warn
Quelch needless warnings (found by Clang)
2013-09-19 05:05:00 -07:00
Roland Kaufmann
13705d0394 Issue warning if unknown parameters are given 2013-09-19 13:10:16 +02:00
Roland Kaufmann
82cf04d9f1 Convert functions in anonymous namespace into statics
These functions are referred to from templates which may not be
instantiated. Since they were in an anonymous namespace they were
not reachable otherwise, and a warning is emitted. This only applies
to Clang; GCC consider them used.

If we make them static helper functions instead, the warning
disappears.
2013-09-19 13:10:16 +02:00
Roland Kaufmann
244c867505 Don't warn about functions not emitted
If a function is used by a template but this template is not
instantiated, the function will still be defined in the header
of a module but it won't be callable because it is in an anonymous
namespace and thus we get a warning.

This only happens in Clang; GCC consider functions referenced from
templates as used.

fixup! Don't warn about functions not emitted
2013-09-19 13:09:44 +02:00
Roland Kaufmann
a7f32b934b Set linear solver steps in criterion instead of ctor
The constructor that takes the number of steps is deprecated; this
generates needless warnings.
2013-09-19 10:32:49 +02:00
Roland Kaufmann
18fad484ed Use struct since that was the original declaration
Otherwise we get a warning later when the real thing is defined.
2013-09-19 10:00:31 +02:00
Andreas Lauser
c106385d9e move the new stuff to opm/core/utility 2013-09-18 23:02:16 +02:00
Roland Kaufmann
f83b734e3e Honor the CMAKE_NOT_USING_CONFIG_FLAGS settings
If this is set, then everything is lumped into CMAKE_CXX_FLAGS since
that is the only one that is going to be used when building anyway.
2013-09-18 14:07:57 +02:00
Roland Kaufmann
e9d0216577 Clear default flags in an (im)proper way
The CMAKE_NOT_USING_CONFIG_FLAGS option is really only settable by a
user that doesn't want _DEBUG or _RELEASE flags to not have effect.
If we want other flags than the platform default, we must do hairy
things like clearing them from the cache (overriding the user's
seletion if it was the same as the platform default).
2013-09-18 14:07:57 +02:00
Roland Kaufmann
d801668c1c Fix logic bug and make language explicit
The operator precedence in CMake can be surprising, so add parenthesis
to make in unambigious. Also, make it more explicit from which language
we get the default options. (They are all set from the settings given
for C++; why would have different optimization options for C and C++?)
2013-09-18 14:07:57 +02:00
Atgeirr Flø Rasmussen
38c65da7c2 Merge pull request #374 from atgeirr/master
Remove deleted headers from install list.
2013-09-18 05:03:49 -07:00
Atgeirr Flø Rasmussen
74cb853072 Remove deleted headers from install list. 2013-09-18 14:01:01 +02:00
Atgeirr Flø Rasmussen
941a116b3f Merge pull request #373 from rolk/373_dunemod
Make finding and installing dune.module work on both Debian and RHEL simultaneously
2013-09-18 03:56:40 -07:00
Atgeirr Flø Rasmussen
1b78495769 Merge pull request #364 from andlaus/fix_headers
fix headers
2013-09-18 03:54:47 -07:00
Roland Kaufmann
9aca9bd746 Use MultiArch-unaware path for dune.module
As of 2013-09 the DUNE code that reads dune.module is not MultiArch-
aware. Thus, for a 64-bit platform it will look in lib/ on Debian and
lib64/ on RHEL.
2013-09-17 23:24:59 +02:00
Roland Kaufmann
c4bb95ed55 Add special variable for MultiArch-unaware components
Some components are not yet MultiArch-aware and installs to either
lib/ (Debian) or lib64/ (RHEL) on 64-bit platforms. If we need to
interface with these components, then it is nice to have such a
variable set together with the regular detection code.
2013-09-17 23:05:52 +02:00
Roland Kaufmann
16c2f694a8 Update the CMake cache to reflect current settings
During configuration some of the values for CMake properties (compiler
flags etc.) may be changed either by the user (through command line
parameters or option files), or by the configuration script itself
(setting more aggressive options or detailed debugging for instance).

This change writes many of the relevant values back into the cache so
they are available for introspection (using e.g. ccmake) or when the
rerunning the configuration without specifying all options.
2013-09-17 22:18:55 +02:00
Bård Skaflestad
4765286e75 Merge pull request #367 from rolk/367_ssparse
Fix search for SuiteSparse/UMFPACK when path is explicitly given
2013-09-12 01:32:31 -07:00
Roland Kaufmann
22297c42f2 Allow use of uppercase version of the _ROOT var
The convention is to use uppercase names, in particular our own
./configure script uses this, so we should at least allow it here
(in addition to the old way for backward compatibility)
2013-09-12 10:10:19 +02:00
Roland Kaufmann
1c69a03f26 Don't set a default search path; use CMake's default
If we set a default search path ourself, then this will be used if we
specify a SuiteSparse_ROOT with error! Instead, we should just leave
our SuiteSparse_SEARCH_PATH variable empty and then let CMake fill in
its defaults. If there is a directory specified on the other hand
(indicating that we want exactly that location), only use that and
turn all the default paths completely off.
2013-09-12 10:08:19 +02:00
Bård Skaflestad
63779f03fa Merge pull request #366 from rolk/366_redhat
Detect OS version when running on RHEL/CentOS 5.x
2013-09-12 00:43:57 -07:00
Roland Kaufmann
9df45bf39d Test variables instead of contents
If you test the contents of a variable, this is not necessarily true
in CMake (since the contents here is a path, and not a variable name;
the default test is "does this variable exist", not "is this a non-
empty string" like in shell script)
2013-09-12 09:36:19 +02:00
Roland Kaufmann
dba7c228ce Detect OS version when running on RHEL/CentOS 5.x
These versions only have /etc/redhat-release, not any of the newer
files.
2013-09-11 22:49:00 +02:00
Atgeirr Flø Rasmussen
4eb03c7e87 Merge pull request #365 from bska/shadowing-symbols
Reduce likelihood of shadowing symbols in OPM_THROW
2013-09-11 04:33:33 -07:00
Andreas Lauser
16e7b7ac33 fix headers
make all non-implementation headers includable without
preconditions. Also, this removes the GravityColumnSolver.hpp file,
because it tried to include a non-existing file and it was thus unused.
2013-09-11 13:11:47 +02:00
Bård Skaflestad
6d84217836 Reduce likelihood of shadowing symbols in OPM_THROW
The OPM_THROW macro uses an internal symbol, 'oss', which is, strictly
speaking, in the client's namespace.  Moreover, as the
"EclipseGridParseHelpers.hpp" header uses the same symbol, and for
similar purposes, this produces warnings at "-Wshadow" in GCC when
compiling that header.

Rename the macro's symbol to 'oss__' (double trailing underscore) to
reduce the likelihood of shadowing a previous definition.
2013-09-11 01:03:25 +02:00
Bård Skaflestad
a4b80532f6 Merge remote-tracking branch 'upstream/master' 2013-09-10 23:42:43 +02:00
Bård Skaflestad
4254832fae Merge pull request #363 from andlaus/require_opm_core_in_opm_material
require opm-core from the opm-material module
2013-09-10 14:24:56 -07:00
Andreas Lauser
8399cff98f require opm-core from the opm-material module
this is required to use the exception code of opm-core in
opm-material. Also, the Dune prerequisites of opm-material can be
removed once PR #345 is merged into opm-core...
2013-09-10 13:34:47 +02:00
Bård Skaflestad
dba6ee9e32 Merge remote-tracking branch 'upstream/master' 2013-09-10 10:42:09 +02:00
Bård Skaflestad
a1f2036b3e Merge pull request #361 from rolk/361_cxxpath
Test for executable and preserve erroneous path for messages
2013-09-10 01:40:40 -07:00
Roland Kaufmann
7285bd8fdf Test for executable and preserve erroneous path for messages
If an alternate compiler is specified, then check if this is actually
executable before assigning it so that we don't end up with specifying
an empty name to CMake. If the path does not exist, it will be preserved
so that CMake will complain with an easily identifiable error message.
2013-09-10 08:55:25 +02:00
Bård Skaflestad
a9a73474c1 Merge remote-tracking branch 'upstream/master' 2013-09-09 16:03:44 +02:00
Bård Skaflestad
bc13496fa2 Merge pull request #356 from blattms/fix-compiler-path-from-variable
Extracts the full compiler path and feeds it to cmake.
2013-09-09 07:01:30 -07:00
Andreas Lauser
8ef3b6e6c7 introduce classes for monotonic, full, periodic and natural cubic splines 2013-09-09 13:29:50 +02:00
Andreas Lauser
2302fc6ce5 add functions to analytically invert polynomials up to degree three 2013-09-09 13:29:37 +02:00
Andreas Lauser
575855f896 add tridiagonal matrix
this class can do both, more and less than dune-istl's BTDMatrix. more
because it supports entries on the lower left and upper right, less
because it does not support a block structure. The primary motivation
for this class were the spline classes which for which the former
feature is required to implement periodic splines and the latter is
not necessary...
2013-09-09 13:17:47 +02:00
Andreas Lauser
d42178c203 Introduce OPM_UNUSED as a portable wrapper to __attribute__((unused))
This works pretty much the same way as DUNE_DEPRECATED (without message).

Thanks to Elias Pipping for implementing this.

dune-common SVN revision: r6556
2013-09-09 13:16:21 +02:00
Bård Skaflestad
8f0be4c421 Merge remote-tracking branch 'upstream/master' 2013-09-09 12:55:31 +02:00
Bård Skaflestad
0652b09210 Merge pull request #352 from andlaus/refactor_exception_classes
Refactor exception handling code
2013-09-09 03:45:44 -07:00