Commit Graph

2751 Commits

Author SHA1 Message Date
Roland Kaufmann
4d00754e01 Move stylesheets into Documentation/ folder
The Doxyfile is still in the root directory because this is more like
a configuration file, and also its presence will be a cue to some
users that Doxygen is possible to run on the project.
2013-02-11 23:08:27 +01:00
Roland Kaufmann
75c92fd91e Move old pkgconfig file back to be in sync with master 2013-02-11 23:08:09 +01:00
Roland Kaufmann
097068f9c1 Move now generic templates into cmake/ directory
Templates can now be reused across projects. The output files are still
put in the root of the output tree because that is where the client
programs will look for them.
2013-02-11 23:06:39 +01:00
Roland Kaufmann
f883d52f0f Make template instantiatable for multiple projects
The name "opm-project" is replaced by the real name of the project.
2013-02-11 23:06:39 +01:00
Roland Kaufmann
5c5a1e5c10 Don't hardcode the library name in templates 2013-02-11 23:06:39 +01:00
Roland Kaufmann
2f20314ffb Pick up description from one place 2013-02-11 23:06:39 +01:00
Roland Kaufmann
66772d4819 Move template to designated cmake/ directory 2013-02-11 23:06:38 +01:00
Roland Kaufmann
5af259f2e1 Report version hash when building
This will reduce the number of "which version are you using"-replies
because this can now be found in the log.
2013-02-11 23:06:38 +01:00
Roland Kaufmann
45e00d88d7 Check the current commit of the project source code
Knowing which commit is being built and if there is any local
modifications to it can be of great help to pinpoint build problems.
2013-02-11 23:06:38 +01:00
Roland Kaufmann
694f98b54a Reinstate figure directory for documentation
The directory must be specified with full path to refer to the source
directory. The images will not be referred to by this path, but rather
copied to the output directory (as of Doxygen 1.7.6.1 at least), unlike
the stylesheet (consistency is so last decade).
2013-02-11 23:06:38 +01:00
Tor Harald Sandve
8ea72fcec1 Use relative path to link style.css correctly from website
If an absolute path is specified, this will be embedded into the
generated files, which is of course not correct when put on another
host.
2013-02-11 23:06:38 +01:00
Roland Kaufmann
33f3bc29e7 Allow in-source builds of ERT in sibling directory
The source code of ERT is located in a devel/ subdirectory, but it is
not usual (?) to have this structure in a separate build directory as
well. If you however build everything in the same directory as the
source code, then this sub-directory needs to be accounted for.
2013-02-11 23:06:38 +01:00
Roland Kaufmann
bacd1c317c Use same default as DUNE; build as a static library
Packages should build with -DBUILD_SHARED_LIBS=ON
2013-02-11 23:06:38 +01:00
Roland Kaufmann
c28950c0f8 Link to core function to get more realistic test
Using umfpack_dl_solve as a test function increases the chance that the
probe will not be able to link successfully if it has not found all
libraries necessary (to link other than trivial test programs).
2013-02-11 23:06:38 +01:00
Roland Kaufmann
bee65647ad Write information file for libtool 2013-02-11 23:06:38 +01:00
Roland Kaufmann
2b7e3f8759 Generate libtool archive (.la) files
These files are text files which specify which platform specific
libraries we should be looking for. We need libtool installed to
use them, but they can be generated pretty inexpensively from the
CMake script itself.
2013-02-11 23:06:38 +01:00
Roland Kaufmann
6f3a7baccd Add standard variables/location hints
There is a convention that one can do `pkg-config --variable=includedir`
and have it return the path to the source files (even if that should
have been taken care of by options in --cflags).
2013-02-11 23:06:38 +01:00
Roland Kaufmann
ae14059a15 Only write source path line once
If more than one match is written, then DUNE_CHECK_MODULES will return
several matches, which becomes a syntax error on the resulting command-
line. Thus, check if there is a match before writing anything.
2013-02-11 23:06:38 +01:00
Roland Kaufmann
33115d6f41 Put static libraries in the same directory as shared 2013-02-11 23:06:38 +01:00
Roland Kaufmann
1533271e03 Only install .debug files when building shared object
Static libraries usually holds the debug information together with the
library because they are not loaded directly (but linked together to an
executable, which can be stripped)
2013-02-11 23:06:37 +01:00
Roland Kaufmann
46975fc130 Enable building as a link in dunecontrol chain
Dunecontrol scans the module directory for certain files and phrases
which must be present if the project can be used as a dependency for
other DUNE modules.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
fdff36fcbf Use full set of dependencies when test compiling
The old implementation erraneously used only the first argument that was
passed to the testing procedure due to the way lists are passed in CMake
when unquoted. Thus, the test failed for SuiteSparse >= 4.0 which needs
more than one dependency.

Also add dependency to BLAS and LAPACK which was hidden because the
caller already included these itself.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
718fce9e2a Add realtime library on Linux, if SuiteSparse >= 4.0
Functions in the helper library is dependent on librt
2013-02-11 23:06:37 +01:00
Roland Kaufmann
4dbefc603a Look for packages from underneath a single root
Previous implementation had a separate search path for headers and for
the library, which in the case of "RedHat-multiarch" made it miss the
library (it was looking for /usr/lib/lib64 instead of /usr/lib64); the
new version starts looking from /usr.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
5772f7a5c2 Explicitly specified paths should replace predefined ones
We don't want a typo in any of those to accidentially make the
configuration pick up the system libraries instead.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
668cf14059 Add config library new to SuiteSparse 4.0
SuiteSparse 4.0 implements many of its internals in a separate helper
directory which must also be linked if this is present.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
f89ad15fe9 Include CMakePushCheckState on our own
Functions in this library was made available by other unrelated
modules, making this file unusable on its own.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
f8d047d4db Try to do without unnecessary dependencies
UMFPACK is by default dependent on CHOLMOD, but on some systems it is
compiled with -DNCHOLMOD; in those cases we should not try to link in
the library -- it may not be available and in any cases it is not used,
so it is just a superfluous dependency.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
172e9b3e33 Bail out if none of the required components are found
The way the test was written earlier, it would accept if it found
components that were transitively pulled in even if the originally
requested component was not!
2013-02-11 23:06:37 +01:00
Roland Kaufmann
ceeba95ba7 Assume that UMFPACK requires CHOLMOD by default
At this time no probe is added to check if an UMFPACK without dependency
to CHOLMOD is installed; thus if you need/want UMFPACK, you'll have to
go for the entire SparseSuite.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
13faf2123e Allow to build without deprecation warnings in dunecontrol
dunecontrol should be passed the option
--configure-opts="--enable-fieldvector-size-is-method" if you want to
rebuild it from scratch without bazillion strange deprecation warnings,
this flag allows us to participate in that dance.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
39758ab13b Revert clever setting of version number in dune.module
dunecontrol will read the dune.module file first, before calling any
configuration files; thus it cannot be initialized from the script
but the version numbers must be hardcoded here and updated manually.
2013-02-11 23:06:37 +01:00
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