Commit Graph

415 Commits

Author SHA1 Message Date
Roland Kaufmann
02165cd9d2 Merge pull request #391 from bska/find-opm-material
[Build System] Catch up to opm-material reorganisation.
2013-09-25 01:31:34 -07:00
Bård Skaflestad
74605d984e Catch up to opm-material reorganisation.
Specifically, file <opm/material/constants.hh> was renamed to
<opm/material/Constants.hpp> and this renaming must be reflected in
the CMake probes for opm-material.
2013-09-24 16:47:15 +02:00
Andreas Lauser
e256a233f0 Findewoms.cmake: fix typo
it's 'start.hh', not 'start.h'...
2013-09-24 15:49:50 +02:00
Andreas Lauser
0af1d9322f remove the dune-istl from the list of opm-material prerequisites
the only reason dune-istl was required was that the spline class used
ISTL's tridiagonal matrix. Since the spline class moved into the core
(along with a more capable tridiagonal matrix), ISTL is no longer
required by opm-material.
2013-09-24 11:49:30 +02:00
Andreas Lauser
06f0b302ca add opm-core to the ewoms prerequisites 2013-09-24 11:46:55 +02:00
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
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
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
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
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
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
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
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
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
Andreas Lauser
f983af5a0b C++-11 Features: add test for std::is_integral 2013-09-03 17:49:18 +02:00
Markus Blatt
cefd7e7702 Extracts the full compiler path and feeds it to cmake.
Previously, specifying the compiler name with a variable
to configure ("configure CC=gcc") lead to CMake complaining
that <builddir>/$CC was not a valid path. This patch fixes
this by extracting the full path with "which <compiler>".
Should fix issue #355.
2013-09-02 18:03:05 +02:00
Bård Skaflestad
76a7cba75e Merge pull request #351 from rolk/351_cxx
Alternate compiler cannot be set with environment variables
2013-08-28 04:10:39 -07:00
Roland Kaufmann
23e1896e40 Mimic Autotools way to specify non-standard Boost
If Boost is installed in say /usr/include/boost141 and
/usr/lib64/boost141, then there is no root you can specify to pick
them both up. However, whereas Autotools uses --with-boost and
--with-boost-libdir, FindBoost in CMake changes to using two different
variables: BOOST_INCLUDEDIR and BOOST_LIBRARYDIR. Using the header
directory for BOOST_ROOT will not work (in particularily not with
old CMake versions).
2013-08-28 11:03:15 +02:00
Roland Kaufmann
976c5c54a2 Print version number in log together with location 2013-08-28 09:47:52 +02:00
Roland Kaufmann
c26ea374ea Special handling for some recognized env. vars.
CMake does not like that you specify the compiler with the environment
variables, instead preferring that you set them as cache variables.
This layer translate between the names of the the two.
2013-08-28 00:27:41 +02:00
Roland Kaufmann
47b2c64675 Always search for dune.module in no-arch lib-dir
The previous version may have ended up in lib64/ instead of lib/;
now we remove the arch-specific suffix from the path, and always
use the no-arch version.
2013-08-27 23:18:36 +02:00
Roland Kaufmann
1065ca3589 Noarch lib-dir was only used in one wrong place
dune.module does not contain any paths to architecture-specific
binaries. It is therefore always installed in no-arch lib/ directory.
Thus, there is no need to have a variable for this, and there was
no other users of this variable either.
2013-08-27 22:26:21 +02:00
Roland Kaufmann
8131f70434 Test ERT for a newer API level
We use an ERT version which needs to know whether at least this
function signature exists. The earlier implementation covers too
many versions.
2013-08-27 14:37:14 +02:00
Roland Kaufmann
476aff4697 Allow build tree of SuiteSparse to be used as root
With this changeset, the build tree of SuiteSparse can be used as the
root; the package does not have to be installed.
2013-08-27 09:05:04 +02:00
Bård Skaflestad
74380b0964 Merge pull request #335 from rolk/335_multiver
Support multi-versioned installation
2013-08-26 06:08:36 -07:00
Bård Skaflestad
8b98840a72 Merge pull request #346 from andlaus/fix_superlu_and_quadmath
Fix superlu and quadmath
2013-08-26 06:07:22 -07:00
Bård Skaflestad
0522184cfb Merge pull request #334 from rolk/334_macver
Support configuration on MacOS X using Apple toolchain
2013-08-26 06:05:38 -07:00
Bård Skaflestad
5edf6be8aa Merge pull request #342 from rolk/342_signals
Provide event mechanism using C++11 instead of Boost::Signals
2013-08-26 05:59:32 -07:00
Bård Skaflestad
372ed60f3c Merge pull request #339 from andlaus/alugrid_parallel_found_no_list
avoid to make ALUGRID_PARALLEL_FOUND a list
2013-08-26 04:22:14 -07:00
Bård Skaflestad
1d28905cb1 Merge pull request #341 from rolk/341_known
Mark known feature variables as used
2013-08-26 04:17:15 -07:00
Roland Kaufmann
542d607674 Remove dependency on Boost::Signals
The functionality has been replaced with equivalents from C++11.
2013-08-26 13:11:25 +02:00
Andreas Lauser
980a1b6eb9 add opm-material to the eWoms prerequisites
this is needed by the imminent switch of eWoms to the OPM build
system.
2013-08-26 13:06:34 +02:00
Bård Skaflestad
0c03c6e733 Merge pull request #329 from andlaus/unquoted_config_vars
cmake: support defining unquoted variables for config.h
2013-08-26 03:25:11 -07:00
Andreas Lauser
3abbe0ef52 cmake: fix the SuperLU test
for me, it was completely broken. (it worked fine if you did not want
to use it, though.) Now it (hopefully) follows the standard OPM
variable naming conventions, allows to use the internal SuperLU BLAS
library, and works fine if superLU is not installed on a system-wide
basis.

v2: cache the POST_2005 variable to make writing it to config.h more
    reliable (on my kubuntu 13.04 system it did not work without it)
v3: re-add a proper "post 2005" check from newer versions of the dune tests
2013-08-25 22:44:30 +02:00
Roland Kaufmann
90df601050 Remove bash4-isms from configuration script
Getting uppercase of a string can be done in a way that is compatible
with Bash 3.2. This creates a dependency on the `tr` utility, but I
reckon it will/can be available everywhere Bash 3.2 is.
2013-08-25 14:27:09 +02:00
Roland Kaufmann
b78deb0982 Use libc++ runtime if necessary for C++11 compliance
If we are using the Apple toolchain on MacOS X, we must use the
newer runtime and not the old GCC 4.2 fork, in order to get the
C++11 library features (such as std::shared_ptr).
2013-08-25 10:49:09 +02:00
Roland Kaufmann
b6d7eb6364 Mark known feature variables as used
Some features, such as the Fortran wrappers, are enabled by options,
and it may be usable to have those set in a common definition file.

However, as these features are included conditionally based on use,
their option variables may not exist in other projects, giving a CMake
warning for them.

Here we list such variables too. Reading them at the end corresponds
to the Autotools convention of ignoring unknown --enable-xxx options.
2013-08-25 09:49:42 +02:00
Roland Kaufmann
e8ec217c52 Remove linker command from compiler command-line
There is no SuiteSparse headers or libraries in
/System/Library/Frameworks/Accelerate.framework on MacOS X, so adding
this directive won't contribute anything other than compiler warnings.
2013-08-25 09:26:21 +02:00