Commit Graph

3755 Commits

Author SHA1 Message Date
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
Andreas Lauser
4db6760b9d fix the SparseVector and SparseTable unit tests
also, throw std::logic_error in the OPM_ERROR_IF macro
2013-09-06 13:27:14 +02:00
Bård Skaflestad
fb64b96695 Merge pull request #359 from rolk/359_cart
Document Cartesian info fields for unstructured grids
2013-09-06 01:13:34 -07:00
Roland Kaufmann
a25e3ea851 Document Cartesian info fields for unstructured grids
The previous text contained an ambiguity of the contents of the field
global_cell in case it was non-null; this could be interpreted as if
the grid was non-Cartesian. However, this is not the convention that
has been followed in current clients.

The new text writes a warning about this, as well as giving a tip on
how an unstructured grid may be signaled through the structure (the
cartdims field is zero-initialized in the create_empty_grid function,
so this array must be actively initialized by the client).
2013-09-06 09:51:26 +02:00
Andreas Lauser
5d435d396c catch all exceptions in all tutorials and examples 2013-09-05 13:04:38 +02:00
Andreas Lauser
c4c771e39b ErrorMacros: remove compatibility macros 2013-09-05 13:04:38 +02:00
Andreas Lauser
23f215bec4 convert users of MESSAGE to OPM_MESSAGE 2013-09-05 13:04:38 +02:00
Andreas Lauser
c25ec5999e convert users of the ASSERT and the ASSERT2 macros to standard assert() 2013-09-05 13:04:37 +02:00
Andreas Lauser
19e5d5cea2 convert THROW to OPM_THROW 2013-09-05 13:04:37 +02:00
Andreas Lauser
0eaf62c7e3 Add a file with OPM specific exceptions 2013-09-05 13:04:37 +02:00
Andreas Lauser
47bb5cde46 refactor the exception throwing code 2013-09-05 13:04:37 +02:00
Andreas Lauser
7a5a725f25 Replace boost::is_integral by std::is_integral 2013-09-05 13:04:37 +02:00
Andreas Lauser
3c9baded80 replace BOOST_STATIC_ASSERT by C++-2011's static_assert 2013-09-05 13:04:37 +02:00
Andreas Lauser
d11db08084 include iostream in the files which use std::cerr or std::cout
for some of these files this is needed to make to keep it compiling
after the next patch because the new ErrorMacros.hpp file will no
longer implicitly includes <iostream>. for the remaining files it is
just good style.

While at it, the includes for most of these files have been ordered in
order of decreasing abstraction level.
2013-09-05 13:04:37 +02:00
Markus Blatt
f35b177f3e Change which test for cmake28 to use command -v. 2013-09-05 12:49:57 +02:00
Markus Blatt
7b2ed3a5e1 substituted which with command -v. 2013-09-05 12:49:21 +02:00
Bård Skaflestad
1d61208d88 Merge pull request #357 from andlaus/test_std_is_integral
C++-11 Features: add test for std::is_integral
2013-09-05 02:01:05 -07:00
Andreas Lauser
f983af5a0b C++-11 Features: add test for std::is_integral 2013-09-03 17:49:18 +02:00