Commit Graph
24 Commits
Author SHA1 Message Date
Andreas Lauser 7d8cb7f24f set CMake policies CMP0026 and CMP0048 to OLD
this is required for CMake 3.0 to stop it complaining that we access
the LOCATION target property and set the *_VERSION_* variables ourselves.
2014-10-01 14:26:22 +02:00
Arne Morten Kvarving 457ea2c44f added: hook for conditionally compiled files
backport from opm-upscaling PR#100
2014-06-16 14:40:52 +02:00
Roland Kaufmann 60c54705c0 Create aliases for probed variables
Headers from other libraries (notably DUNE) require definitions of
other variables than our probe process set (e.g. HAVE_UMFPACK instead
of HAVE_SUITESPARSE_UMFPACK_H). This module sets those aliases for
compatibility.
2014-01-24 13:58:47 +01:00
Roland Kaufmann 16c2f694a8 Update the CMake cache to reflect current settings
During configuration some of the values for CMake properties (compiler
flags etc.) may be changed either by the user (through command line
parameters or option files), or by the configuration script itself
(setting more aggressive options or detailed debugging for instance).

This change writes many of the relevant values back into the cache so
they are available for introspection (using e.g. ccmake) or when the
rerunning the configuration without specifying all options.
2013-09-17 22:18:55 +02:00
Bård Skaflestad ed3552cfb5 Merge pull request #319 from rolk/319_confvar
Trim unnecessary config.h defines from prerequisite list
2013-08-17 05:37:35 -07:00
Roland Kaufmann 3df0f06f45 Use OPM_MACROS_ROOT to locate build scripts
By using a separate variable for this we can easily grep for where
the build system depends on its own location, and also change the
policy regarding this later.

Note that there is no opm-macros module; this is a "psuedo"-module
which links to an additional one (currently, the one we're in)
2013-08-14 21:26:28 +02:00
Roland Kaufmann 1e46bdaaa8 Allow adding project-specific install targets
If a project needs to install something that is very specific and not
in the general build, it can use this hook to setup additional targets.
2013-08-14 21:16:55 +02:00
Roland Kaufmann ea1afba738 Put HAVE_DYNAMIC_BOOST_TEST in config.h for tests only
This define is used by the unit tests; there is no reason why it should
be on the list that must be provided by other projects that use our
headers (the other projects don't use our tests).
2013-08-14 20:28:16 +02:00
Bård Skaflestad ca44960c5e Merge pull request #298 from rolk/298_dunever
Make version numbers for DUNE prerequisites available
2013-08-08 04:10:25 -07:00
Roland Kaufmann 262b0f7619 Only configure libtool for libraries that exist 2013-08-08 10:09:08 +02:00
Andreas Lauser 0d14d25ef5 Build system: make it work for modules which do not need libraries 2013-08-07 16:06:05 +02:00
Roland Kaufmann 1490cd7389 Provide hook to configure getting other's version
This hook together with the bundled convenience macro makes it
possible to add the version of another module to config.h using
code like this:

macro (config_hook)
  opm_need_version_of ("dune-common")
endmacro (config_hook)
2013-08-05 21:09:09 +02:00
Roland Kaufmann 1e9d368012 Create a set of config variables for implementation
The config variables in _CONFIG_IMPL_VARS are only written to config.h
and not the .pc or -config.cmake files. They can thus only be used by
the implementation files and not the headers. Use this set to avoid
exposing the variables to other projects, when it is likely that a
probe used by that other project may turn up a different result.
2013-08-05 20:16:30 +02:00
Roland Kaufmann 8efd1c0aa9 Support compiling files that are in the attic
Since these files are not actively maintained, we don't assume that
the project actually has any, nor are they part of the default build.
2013-08-02 20:31:06 +02:00
Bård Skaflestad 0e42c0e20c Merge pull request #292 from rolk/292_fastbuild
Add possibility to skip building tests and examples
2013-07-31 05:45:47 -07:00
Roland Kaufmann 1378114cec Add a switch for examples similar to the one for tests
Running tests during development at least has a purpose, but compiling
all the samples *every* time is just an annoyance.
2013-07-31 14:03:53 +02:00
Roland Kaufmann ea973849e0 Disable testing if BUILD_TESTING is switched off
This is an "official" switch for disable testing; our own code which
adds tests should adhere to it. (It is added by CTest)
2013-07-31 13:58:06 +02:00
Roland Kaufmann 928a67b77f 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-07-31 12:04:07 +02:00
Roland Kaufmann 6757860aac Make sure CMake is re-run if dune.module changes
Version number in this module is included in the name of the library;
if we make changes to dune.module, it should do a complete reconfigure.
2013-07-31 11:05:53 +02:00
Roland Kaufmann 3f4695794d Eliminate _MODULE_DIR variable
It is only used in one place, where it can easily be replaced by its
expansion. The reason for removing it is that it depends on the name
of the project, and I intend to read this using a routine it the very
directory it is including, hence the need for a different approach.
2013-07-30 13:26:16 +02:00
Roland Kaufmann 0696a21280 Print linker version to log 2013-07-05 12:45:39 +02:00
Roland Kaufmann a4767f754b Don't include prerequisites here; do it more explicitly
Developers that are working to familiarize themselves with OPM will
probably start out in CMakeLists.txt to figure out where the project
declare its dependencies, thus the list should be referred to from
there instead of inside one of the sub-modules.
2013-07-04 23:47:38 +02:00
Roland Kaufmann 2c8e068812 Remove the project parameter for the customization hook
The hooks are meant to be project specific, and should therefore
either know their own name or at least have access to a variable with
that name in it.
2013-06-29 22:04:00 +02:00
Roland Kaufmann 38bd5b0ad3 Common code for building OPM library modules
Most of the OPM libraries follow the same template; this include file
contains all the common code.
2013-06-25 23:53:40 +02:00