Commit Graph

2719 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
d8c045cdfd Exclude embedded TinyXML library from doc generation. 2013-02-11 23:06:36 +01:00
Roland Kaufmann
aedada918e Install .debug files in system location if writable
If the installation prefix is set to /usr, then it is assumed that the
user has write access to the entire of that subtree, and that it would
be advantageous to put the .debug files in the /usr/lib/debug directory.
This is the usual case for package installations.

On the other hand, if the prefix is NOT /usr, then it is probably a
local installation; someone trying to install it to a more restricted
area. In that case, the default is to follow the binary, so that GDB
will still pick up the .debug file when loading the shared object.

In any case can this default be overridden, should it turn out that the
configuration script has guessed wrongly for your needs.
2013-02-11 23:06:36 +01:00
Bård Skaflestad
49faa85241 Fix DisjointColumn test case
The test started failing in commit 7d7f62e, but this was not detected
due to no automatic test environment.  The commit changed the cell
numbering from "per-column (K,I,J)-ordering" to "per-plane
(I,J,K)-ordering".  Consequently, the "correct_answer" seized to be
correct.

This change restores the "correct_answer" in the ordering introduced by
commit 7d7f62e.

While here, adjust style of the DisjointColumn test case for legibility.
2013-02-11 23:06:36 +01:00
Roland Kaufmann
80f4c93973 Make datafiles from source tree available for tests
The datafiles that are in the tests/ directory are copied to a
corresponding location in the output tree, and the tests are then
executed from this directory (i.e. their current directory is set
to tests/.

If a test overwrites an input file, this will not be noticed in the
source tree -- but don't do that! The tests have write access to
their current directory, so they can generate new files and compare
them to a stored master file.
2013-02-11 23:06:36 +01:00
Roland Kaufmann
c4da0fc42c Ignore newer build artifacts 2013-02-11 23:06:36 +01:00
Roland Kaufmann
ad4e9064f7 Write pkgconfig files as well as CMake
Note that using pkg-config is NOT recommended because of:

1. It doesn't know which language you are using, so language-specific
   options such as -std=c++11 or -std=c99 cannot be passed along. Yet,
   the build will corrupt if you don't get these correct.

2. It has no means of communicating which defines that should be set
   in config.h, effectively disabling them all, possibly leading to
   inconsistencies between the library and the executable.
2013-02-11 23:06:27 +01:00
Roland Kaufmann
848c30a67e Move old pkgconfig file out of the way temporarily 2013-02-11 23:02:49 +01:00
Roland Kaufmann
7c1568311e Multi-arch support in writing config mode file 2013-02-11 22:38:02 +01:00
Roland Kaufmann
5ed1aa37f0 Move writing of config module to library routine 2013-02-11 22:38:02 +01:00
Arne Morten Kvarving
18a6f709b0 Update import of ERT-Eclipse headers to new location 2013-02-11 22:38:02 +01:00
Roland Kaufmann
5aa7def08d Search in sibling directories if no other version found
Thus, if you checkout projects in a common directory, they will find
eachother.
2013-02-11 22:38:02 +01:00
Roland Kaufmann
61cdf5c1d6 Search for libraries on multi-arch distributions 2013-02-11 22:38:02 +01:00
Roland Kaufmann
2e1f2f3ffb Search for ERT library in updated locations
ERT project has recently changed the output locations due to packaging
efforts.
2013-02-11 22:38:02 +01:00
Roland Kaufmann
529b2bc88b Build tutorials through Makefile
Newcomers may want to step through the tutorials in the debugger without
creating a new project specifically for them; this enables them to do so
through the regular build system.

To see how a program is linked with the library, just execute

    make tutorials VERBOSE=1
2013-02-11 22:38:02 +01:00
Roland Kaufmann
cfb419282e Enable printing of compiler command-lines 2013-02-11 22:38:01 +01:00
Roland Kaufmann
22f5ccf970 Use only necessary libraries 2013-02-11 22:38:01 +01:00
Roland Kaufmann
a0e0535512 Module to prune unnecessary libraries from link
On Linux all libraries that are specified on the command-line will be
referred to in the resulting binary. There may be find modules which
just adds everything to satisfy every possible dependency; we want to
discard those unnecessary libraries.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
05a4ff30bf Enable opt-out of precompiled headers
Some versions of the compiler are buggy, and will actually crash if
precompiled headers are used. This option enable disabling the feature
and building without by simply setting a command-line option.
2013-02-11 22:38:01 +01:00
Andreas Lauser
2cc9807b63 Enable CDash testing
Configure everything using CMake and run 'ctest -D Experimental'
inside the build directory. If you want to participate in the nightly
testing, add

	#!/bin/sh
	cd $BUILD_DIR
	exec ctest -D Nightly

to /etc/cron.daily/opm-core. The results can then be browsed at

<http://opm-project.org/CDash/index.php?project=opm-core>
2013-02-11 22:38:01 +01:00
Roland Kaufmann
c1023c0824 Run unit tests when doing `make check' 2013-02-11 22:38:01 +01:00
Roland Kaufmann
407faacdfc Use each unit test program as a CTest test
The name of the test is taken from the stem of the file; if two tests
have the same name in different directories, the makefiles will get
confused, so don't do that.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
c051337c29 Only build proper unit tests
People are encouraged to convert the tests in not-unit/ to proper unit
tests and move them back into the parent tests/ directory; they will
then be picked up by the testing framework automatically.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
8c6302f123 Restructure tests directory to unit tests
Every program that relies on manual inspection has been moved to a new
(hopefully short-lived) directory called not-unit/; every remaining
file has been given the prefix test_ to indicate that this is the
executable test to be run.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
dc92805d9a Safe-guard against empty directories
CMake will raise an error if you try to remove something from an
unset variable (whereas removing something from an empty list "" is
fine). If the user doesn't have the appropriate library, the search
will turn out empty, and the configuration will fail with a syntax
error instead of a message that the library is not found.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
73c604f541 Put debug files in GDB's debug-file-directory
This puts the .debug file in the separate root reserved for such, as
pointed to by GDB's debug-file-directory setting, see
<http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html>

Notice that this is *outside* of the prefix tree!
2013-02-11 22:38:01 +01:00
Roland Kaufmann
6471b7ef3a Issue information about --prefix and DESTDIR in help
Use --prefix= in ./configure to enter the directory under which the
files should be installed on the target system, use DESTDIR= in
make install to redirect files to another location when building.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
af014936cc Create DUNE module file from CMake properties
That will save us from keeping the files in sync manually.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
f4350098ed Use precompiled headers to compile C++ modules
On an average system this will cut around 15% of the total build time.
Unfortunately, including Boost headers in the precompiled header takes
longer time to generate and then read in each module, than just
including the necessary headers in each module.

Use Noel Llopis' list_precomp.py at
http://www.gamesfromwithin.com/wp-content/uploads/bin/list_precomp_py.txt
to analyse which headers are included the most and are candidates for
inclusion.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
e0e1a24edd Module to precompile headers
This CMake module will set up a target for compiling a set of headers
which can then be added to compilation modules to speed up compilation.

A separate target is created because the function doesn't know all the
sources of a target, and to reuse the precompiled header across several
targets that share the same characteristics (such as unit tests).
2013-02-11 22:38:00 +01:00
Roland Kaufmann
3ca1d229d2 Don't print directory trail
We don't need this since we don't use a recursive make scheme. It just
adds to the output due to our extra level of (make) indirection.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
e10141ba7b Disable ccache by default
We do dependency management the right way; there should be no need to
use ccache on top of this. Actually, it will just hurt performance to
do so without any win.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
52304ef5e3 Remove TinyXML from list of headers to be installed 2013-02-11 22:38:00 +01:00
Roland Kaufmann
e951358d0b Test for directory existence before getting canonical path 2013-02-11 22:38:00 +01:00
Roland Kaufmann
b2569225cd Allow location of TinyXML to be specified 2013-02-11 22:38:00 +01:00
Roland Kaufmann
6ad5ebeffe Install debug files
As part of a -dev package, we would like to install the debug symbols
together with the headers.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
8b4a5969c0 Return name of debug files that has been stripped
These files can then be installed on the system, too.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
e46d950739 Provide backward-compatibility modules for older CMakes
BLAS module originally required Fortran to be enabled, newer module
doesn't; LAPACK module had some spelling errors that prevented it
from working; and cmake_push_check_state() is not available before
2.8.6.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
4522ebbef3 Use relative path function instead of string manip.
This rest-of-string functionality is not supported by older CMakes
anyway.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
6d62476eaa Make without generator expressions
These are only supported from CMake >= 2.8.4; however, we can replicate
the functionality be smartly query target properties.
2013-02-11 22:37:59 +01:00
Roland Kaufmann
90d30bee90 Disallow source files with leading period
These tend to be backup files (on the form .#*#), and anyway CMake will
later consider them to not have a proper filename stem (everything is
part of the extension), leading to all sorts of strange errors.
2013-02-11 22:37:59 +01:00
Roland Kaufmann
6a92569070 Use custom version scheme instead of fragile CMake one
CMake will not be able to make sense out of the YYYY.MM versioning
convention (since the "major" versions are not related), and we
expect API breakage in the short term anyway.
2013-02-11 22:37:59 +01:00
Roland Kaufmann
4aa523e534 Only compile in support for solvers that are found 2013-02-11 22:37:59 +01:00
Roland Kaufmann
6ec0767239 Use system TinyXML if available; otherwise our own 2013-02-11 22:37:59 +01:00
Roland Kaufmann
c0c42ec453 Find module for TinyXML
This reuses most of the OPM infrastructure, even if it isn't an OPM
project. Thus it probably have little value outside the OPM family.
2013-02-11 22:37:59 +01:00
Roland Kaufmann
107019d22b Only clean up config variables if there actually is any 2013-02-11 22:37:59 +01:00
Roland Kaufmann
7227bbf801 Better error messages on missing items
The old version only said that _req_vars was not found; now you get to
see the actual variables that are missing.
2013-02-11 22:37:59 +01:00
Roland Kaufmann
c3f2dad1c6 Transitively make dune-common optional if dune-istl is
CMake fails if a package that was required is not found, even if the
one module finding that package was optional itself.
2013-02-11 22:37:59 +01:00
Roland Kaufmann
eaac6631e2 Disable generation of LaTeX/PDF documentation
Class listings are impractical in PDF format. Instead, the tutorial
alone could perhaps be published in PDF.
2013-02-11 22:37:59 +01:00
Roland Kaufmann
2c31bee5dd Support arch.-indep. libraries files for 64-bit sys.
Fedora uses lib64/ for architecture-independent files on 64-bit systems,
whereas Debian (which is multi-arch for binaries) uses lib/
2013-02-11 22:37:59 +01:00
Roland Kaufmann
03e71967c5 Build on systems that don't have /proc mounted
If we are building in a VM which doesn't have /proc mounted, then it is
most likely that this is done on a shared server; we revert to building
for a single processor.
2013-02-11 22:37:59 +01:00