Commit Graph

2690 Commits

Author SHA1 Message Date
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
Roland Kaufmann
52e0c6ceba Put figure generation program with number generation programs
Since the data files are generated by the tutorials, it is natural to
have the figure generation program also together with this source code;
otherwise people may think that it have to be used for *all* figures
2013-02-11 22:37:59 +01:00
Roland Kaufmann
30dc4196e7 Take output directory as command-line parameter
These changes make it easier to call the program from a generated
Makefile rule, since only the Makefile knows where the output tree
is (containing the rest of the documentation).
2013-02-11 22:37:58 +01:00
Roland Kaufmann
495571c53d Assume that tutorial programs have already been run 2013-02-11 22:37:58 +01:00
Roland Kaufmann
81d98d9434 Add target to run self-tests
`make check` is run by the Debian package creator, so it must be a
supported target in the Makefile. For now this is just the same as
`make tests`, but in the future we may/should/must expand this to
also run the tests and figure out if the output is OK (whereas
`make tests` will continue to only compile them)
2013-02-11 22:37:58 +01:00
Roland Kaufmann
8eb6a70c5e Replace build script with a smart wrapper
If a user simply types `make` it will run in parallel by default, which
is what we want to do in most cases.
2013-02-11 22:37:58 +01:00
Roland Kaufmann
21f524e7a5 Enable support for multi-arch on Debian/Ubuntu 2013-02-11 22:37:58 +01:00
Roland Kaufmann
aae0d2b0ad Supplement GNUInstallDirs to support multi-arch
Debian object code libraries are in directories which include the
platform name to allow several of these to co-exist. Other distros
such as Fedora uses a simpler naming scheme (e.g. "lib64/") which
is more backward-compatible.
2013-02-11 22:37:58 +01:00
Roland Kaufmann
d193938597 Set version number to 1.0 in anticipation of release
Version numbers for the library follow ABI-style and is independent
of the ones for releases. If the interface breaks, we change the
soversion, regardless of the timing of the releases.
2013-02-11 22:37:58 +01:00
Roland Kaufmann
3adbcaad06 Annotate dependencies with version number 2013-02-11 22:37:58 +01:00
Roland Kaufmann
3e33d132a9 Allow system installation to be used with dunecontrol 2013-02-11 22:37:58 +01:00
Roland Kaufmann
989e38a68a Allow umfpack to be used as an alias for SuiteSparse
Most people will associate the use of SuiteSparse with "using UMFPACK"
since that is the component that is actively used.
2013-02-11 22:37:58 +01:00
Roland Kaufmann
5a14e481fb Let SuiteSparse path be specified without config mode
Use the _ROOT suffix to direct the CMake module to use a particular path
to the SuiteSparse installation without also triggering config mode (by
convention CMake uses Foo_DIR as the name of the variable which
specifies where to look for another *project*).
2013-02-11 22:37:58 +01:00
Roland Kaufmann
20153000bc Build tests as a separate target
It is very annoying having to build all the tests when you are
testing some code in the main library. Someone downloading the
library probably doesn't need the tests either, so these are left
out of the default target.
2013-02-11 22:37:58 +01:00
Roland Kaufmann
ce73423ba4 Enable release mode from wrapper script
By using --disable-debug (--enable-debug is the default), release mode
can be toggled from the wrapper script.

Some IDEs, notably QtCreator requires this flag to be set when running
CMake, in order to enable debugging properly. Thus, it is explicitly
set (and printed) when using ./configure also.
2013-02-11 22:37:58 +01:00
Roland Kaufmann
a05ba20165 Provide ability to build in DUNE framework
dunecontrol will look for a file called dune.module and use the
information therein to determine which and in what sequences directories
should be built.

By specifying dune-common and dune-istl as dependencies here, we
ensure that those directories are available before opm-core. They are
not true dependencies; opm-core is usable without them, but if you are
using dunecontrol, then it is a good bet that dune-istl also is
available and desirable to use.
2013-02-11 22:37:57 +01:00
Roland Kaufmann
3bac901afe Quote paths
Otherwise strange things will happen if they contain spaces
2013-02-11 22:37:57 +01:00
Roland Kaufmann
dcba0c32bd Assume that all paths to modules are directories
Old implementation had a problem with the special case that you
specified a directory directly under the root (e.g. /usr); dirname
adds a trailing slash in that case.
2013-02-11 22:37:57 +01:00
Roland Kaufmann
4eb1a07759 Display CMake command-line that is being executed
Since this is a compatibility script it will probably benefit people
seeing which underlaying CMake command is being executed (not at least
for debugging purposes)
2013-02-11 22:37:57 +01:00
Roland Kaufmann
60ea52ade1 Provide distclean target to remove CMake artifacts
If you are building in-tree (which is commonly done by dunecontrol),
it can be advantageous to have a target which is capable of cleaning
out all the files that CMake left without having to erase the entire
folder.
2013-02-11 22:37:57 +01:00
Roland Kaufmann
10f8dfa390 Allow DUNE paths to be specified in configure
Path to DUNE libraries are specified with the ROOT prefix, but with the
stem with the same name as the module -- in lowercase (otherwise; does
the hyphen uppercase to underscore?). This deviates somewhat from the
usual CMake convention of using uppercase all over the place.
2013-02-11 22:37:57 +01:00
Roland Kaufmann
d9f984ecc5 Ignore version output
When creating CMake files for config mode, a separate version file is
generated; this should be on the ignore list as well if we are going
to build in-tree.
2013-02-11 22:37:57 +01:00
Roland Kaufmann
8b7990a8ea Remove tabs in shell script
Indentation by tab will cause a file listing for the current directory
before the command is executed, and that what not intended here.
2013-02-11 22:37:57 +01:00
Roland Kaufmann
773e645ac0 Keep build dir tidy by relocating Fortran modules
If we are building in-source, we don't want to have a bunch of output
files in the root directory; instead we put them in CMakeFiles/ where
all the rest of the object files go.
2013-02-11 22:37:57 +01:00
Roland Kaufmann
8c808e7262 Explain why globs can be used to enumerate source code
The documentation argues against it, but I believe it uses flawed
reasoning.
2013-02-11 22:37:57 +01:00
Roland Kaufmann
8ce114df89 Make documentation installable
If `make install` is run, the document is included if and only if
it has already been built. If `make install-html` is run, then the
documentation is always generated first, before installation. To
build the documentation separately from installation use `make doc`
2013-02-11 22:37:57 +01:00
Roland Kaufmann
22dee20c9f Don't expect human interaction in build
If the build fails, we want the error logged to a file, not that the
build hangs on a terminal (which may even not exist!)
2013-02-11 22:37:57 +01:00
Roland Kaufmann
bc327eed1e Disable tons of warnings in building documentation
The volume of warnings generated for the documentation completely drowns
out anything else useful. Until we have fixed more of the comments, this
should be disabled as to focus on problems with the code instead.
2013-02-11 22:37:56 +01:00
Roland Kaufmann
ffe00180a6 Generate documentation in a custom target
The targets are named after the similar targets when using Autotools.
2013-02-11 22:37:56 +01:00
Roland Kaufmann
8b3b753662 Use paths from build-spec. instead of relative paths 2013-02-11 22:37:56 +01:00