Commit Graph

29 Commits

Author SHA1 Message Date
Arne Morten Kvarving
5dca993b69 add check-commits target 2014-12-08 15:26:18 +01:00
Andreas Lauser
73db2c388c add support for the UG grid library
recently UG has become free software (yay!), so we can now support it
with a good conscience. The CMake module is based on the "UseUG.cmake"
module of dune-grid but it is quite a bit simpler and actually
works. (I cannot see how UseUG.cmake can work without ever including
the ug-config*.cmake files...)

the UG source code is available here:

https://github.com/ugfem/ug
2014-04-22 13:35:23 +02:00
Andreas Lauser
633dd9c945 configure: fix all except one warning produced by shellcheck
thanks to @bska for pointing this tool out!
2013-11-25 18:33:26 +01:00
Andreas Lauser
d07b201656 fix syntax error in configure shell script
strangly enough, it seems to work like it was in some circumstances...
2013-11-25 13:29:45 +01:00
Andreas Lauser
4c246092b6 include the latest review comments by Roland Kaufmann 2013-11-25 11:38:21 +01:00
Andreas Lauser
5e73968b57 configure script: add a stub implementation for the --config-cache argument
so far, it is only a flag which prevents the cache from being
deleted. To warn the user about a potential infinite loop, a warning
is printed if this flag was specified and some compiler or some compiler
flags were set by the user. This idea was proposed by Roland Kaufmann.
2013-11-25 11:38:15 +01:00
Andreas Lauser
ba4c7400ba configure script: also delete the cmake cache
This replicates the autotools behavior and was suggested by Roland
Kaufmann.
2013-11-25 11:38:14 +01:00
Andreas Lauser
2e9272384d build system: prevent endless loop when using dunecontrol
this seems to be a bug in cmake 2.8.10.2: if the user sets the
CMAKE_CXX_COMPILER variable for a build directory where this variable
has already been set, one gets an endless loop. This stings especially
if using the dunecontrol compatibility layer as the compiler flags are
unconditionally set via the CXX_FLAGS environment variable in the
options file. Running duncontrol on a module twice will thus trigger the
infinite loop if some compiler flags are set by the user.

The solution is relatively simple: Delete the CMakeFiles directory
before calling cmake. for the dunecontrol compatibility mode, we do
this in the configure script. For details about the cmake bug, see
http://www.cmake.org/Bug/view.php?id=14119
2013-11-25 11:38:13 +01:00
Roland Kaufmann
cb89621813 Only add option for shared libraries once
The way the test was done previously, it was added for *every* option
after `--enable-shared`, not only that one.
2013-11-05 09:55:38 +01:00
Roland Kaufmann
5a2e633f9d Pass BUILDNAME and SITE options along to CTest/CDash
By passing these options through ./configure, one can use dunecontrol
to build a complete stack and still get a customized description in
CDash (such as when building in a cluster or VM where the actual machine
name does not matter, or when you want to add key options to the name
shown) without having to run a second configuration just to set those
in the cache.

Also fixes a bug where --with-cmake would skip any further option
specified after it.
2013-10-08 17:44:06 +02:00
Roland Kaufmann
f786b832c0 Enable MPI if path is given
Assume that ./configure --with-mpi= also implies --enable-mpi; if you
absolutely want to specify path without enabling (?!) then you can do
--with-mpi=... --disable-mpi (in that order).

This patch look for anything after the equal sign of the --with
parameter and only set the variable _MPI_PREFIX_PATH if that is given;
it always toggle USE_MPI.
2013-10-07 15:49:51 +02:00
Roland Kaufmann
a41b5e140e 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-24 15:39:39 +02:00
Markus Blatt
efc7fab49c Change which test for cmake28 to use command -v. 2013-09-24 15:39:39 +02:00
Markus Blatt
3db8443c8c substituted which with command -v. 2013-09-24 15:39:38 +02:00
Markus Blatt
23499b7616 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-24 15:39:37 +02:00
Roland Kaufmann
eb1086a2b8 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 13:21:25 +02:00
Roland Kaufmann
779e366f73 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 13:21:24 +02:00
Roland Kaufmann
433d33e008 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-27 09:24:34 +02:00
Roland Kaufmann
a64118cb81 Simplify creation of Fortran function wrappers
The old version invoked a Fortran compiler to figure out the bindings
necessary to link to a Fortran function. This creates a dependency on
having a Fortran compiler, even though the project may not have any
Fortran source it needs to compile!

Also, the Fortran compiler that is installed on the system may not be
the same as was used to compile the library anyway, so we are not even
sure that this is correct!

Furthermore, FindLAPACK operates on the assumption that names in that
library is suffixed with a single underscore, so if that is not correct,
we won't find any of the functions in that library anyway!

Thus, this patch enables us to assume that appending an underscore is
the right thing to do without using the compiler. This option is off by
default, but can be activated with USE_UNDERSCORING=ON (named after the
GFortran option).
2013-08-27 09:24:22 +02:00
Roland Kaufmann
fab7284717 Add support for Eigen3 in Autotools compatibility layer 2013-08-20 20:48:24 +02:00
Roland Kaufmann
dcc972f128 Allow source location to be overridden
By default the configure script assumes that the source is located
relative to the script itself. By allowing this to be overridden, the
script can be shared by other projects, each passing their own location
as an extra parameter.
2013-08-16 23:55:44 +02:00
Andreas Lauser
eed47decf2 tweak the configure script
we should recognize the --with-{alugrid,metis} options...
2013-08-16 23:55:41 +02:00
Roland Kaufmann
8ec655e321 Remove support for AGMG from the build system
AGMG is now under a closed-source license, meaning that results
obtained with this solver is not freely reproducible by others.
Its use is therefore discouraged.

As of version 2.3, the DUNE AMG parts are competitive, so there
is a free and open alternative.
2013-08-16 23:55:35 +02:00
Roland Kaufmann
1951f796af Enable support for Ninja build generator
Use the Ninja build generator if '--enable-ninja' is passed on the
command line to ./configure (or of course if -GNinja is passed
directly to CMake).
2013-08-14 23:39:05 +02:00
Roland Kaufmann
ae53847e52 Use RUNPATH in installed library by default
When checking out from source code, the paths that were used to
configure the project should be carried on to the installed binary,
so the same libraries are used without much effort.

By using RUNPATH instead of (just) RPATH, it can be overridden with
LD_LIBRARY_PATH if the user so desires.
2013-08-14 23:39:04 +02:00
Roland Kaufmann
51c31938b9 Let the AutoTools script disable tests and samples also 2013-08-14 23:39:04 +02:00
Roland Kaufmann
be7b392690 Write version information into header file
Akin to config.h, we write project-version.h whenever the VCS sha hash
of the project changes. This file can then be included to embed this
into the project. Since this changes more frequently, we choose another
file than config.h. Care is also taken to not rewrite the header if the
information doesn't change, but the project is rebuilt.
2013-08-14 23:39:03 +02:00
Andreas Lauser
23088686a6 autodiff: make it compatible with dunecontrol
the 'configure' script was missing...
2013-07-30 21:12:23 +02:00
Bård Skaflestad
116f39e8ab Import CMake support from OPM-Core 2013-05-15 10:24:52 +02:00