Commit Graph

18 Commits

Author SHA1 Message Date
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