Commit Graph

278 Commits

Author SHA1 Message Date
Roland Kaufmann
7953a0cdad Read project properties from dune.module
We cannot generate dune.module because that file is read by dunecontrol
before the build starts. It therefore make sense to let it be the
original and let the build system read it instead of duplicating the

This module is a adaption of Andreas Lauser's OpmParseDuneModule
in opm-material, modified to handle the more sparse info provided by
the other modules as well.
2013-08-14 23:39:03 +02:00
Roland Kaufmann
43b2929825 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-08-14 23:39:03 +02:00
Roland Kaufmann
f856de9817 Parse RHEL5 linker strings better 2013-08-14 23:39:02 +02:00
Roland Kaufmann
44764454a2 Print linker version to log 2013-08-14 23:39:02 +02:00
Roland Kaufmann
b72ebed8c2 Add function to detect linker version
The linker that is used (ld vs. gold for instance) is often hidden
when using the compiler as a front-end (to include the correct
runtime libraries).

These functions enables us to probe the linker version and reports
its finding in the log.
2013-08-14 23:39:02 +02:00
Markus Blatt
cc0631cd65 Adjusts macro documentation to recent change. 2013-08-14 23:39:02 +02:00
Roland Kaufmann
adb57cdd6c Include file list from top-level instead of module-level
Increase the visibility of the source file name include by no longer
putting it in a module, but rather by including it in CMakeLists.txt
2013-08-14 23:39:02 +02:00
Roland Kaufmann
6dae7cf379 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-08-14 23:39:02 +02:00
Markus Blatt
b2006496c6 Change marker EXCLUDE_ALL to EXCLUDE_FROM_ALL in opm_compile_satellite
Previously, when passing EXCLUDE_ALL to opm_compile_satellite this
resulted a cmake error:

CMake Error at cmake/Modules/UseDebugSymbols.cmake:71 (get_target_property):
  Cannot find source file:

    EXCLUDE_ALL

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx
Call Stack (most recent call first):
  cmake/Modules/OpmSatellites.cmake:77 (strip_debug_symbols)
  CMakeLists.txt:176 (opm_compile_satellites)
2013-08-14 23:39:02 +02:00
Roland Kaufmann
1196201046 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-08-14 23:39:02 +02:00
Roland Kaufmann
b0c5549e30 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-08-14 23:39:02 +02:00
Roland Kaufmann
4b305a0822 Get prerequisites from a separate "header" file
Note that the variable containing the dependencies must be expanded
inside quotes; otherwise the list will spill into the argument list!
2013-08-14 23:39:02 +02:00
Roland Kaufmann
25ae6d5cb7 Notify callbacks when a timestep has completed
Client code can do additional processing for the output of each
timestep.
2013-08-14 23:39:02 +02:00
Roland Kaufmann
e5d5c40875 List prerequisites for modules in a separate file
This file can be included both in the project itself, and also in the
find module for the library, so that the list of dependencies can be
maintained in only one place.
2013-08-14 23:39:01 +02:00
Bård Skaflestad
56db862baf Add CMake backwards compatibility for version < 2.8.3
Add features that aren't available in early versions of the 2.8.x
release series, enabling use of 2.8.0 if needed (e.g. Ubuntu 10.04)
2013-08-14 23:39:01 +02:00
Roland Kaufmann
9ee29561c8 Recognize lib dirs that may be used later
This let you specify a bunch of directory names on the command line
to *all* packages, without getting annoying warnings that they are
defined but not used.
2013-08-14 23:02:40 +02:00
Roland Kaufmann
7bf82f96b2 Disable link-time, whole program optimization
When using LTO, the linker calls back to the compiler to figure out
where a certain symbol is defined. However, in many versions there
is apparently a bug that is triggered if a template in inlined in
both a used library and in the main program, but with different
versions of the compiler. The Boost exception class is particular
prone for this.

Thus, we disable the -lto from the development builds by default;
if anyone wants to test of the behaviour of their own compiler, they
must now explicitly turn on this flag.
2013-08-14 22:59:55 +02:00
Andreas Lauser
bec3d5db2c make the c++-2011 feature set of GCC 4.4 mandatory
we now produce an error even if the module in question does not
actually use some of these features.
2013-07-30 21:12:23 +02:00
Andreas Lauser
e6cf509ea9 check for the C++-2011 'auto' keyword.
It seems like the corresponding FindCXX11Features.cmake file
was not updated for this module.
2013-07-30 21:12:23 +02:00
Andreas Lauser
23088686a6 autodiff: make it compatible with dunecontrol
the 'configure' script was missing...
2013-07-30 21:12:23 +02:00
Roland Kaufmann
6b9d1e2da5 Search common suffixes for include files
This allows us to set e.g. -DEIGEN3_ROOT=/usr/local, and have the
files actually be located in /usr/local/include/eigen3
2013-06-25 14:54:22 +02:00
Roland Kaufmann
eef87e48ad Use standard code to handle not found case
Instead of setting EIGEN3_FOUND ourselves, rely on the standard method
to check arguments and raise an error if not found.
2013-06-25 14:49:11 +02:00
Roland Kaufmann
05e516bb4a Allow mixed case name in variable (as for package)
Since the package is named Eigen3 (in mixed case), we should allow
for the variable to be named this way, too.
2013-06-25 14:49:11 +02:00
Roland Kaufmann
b446ac99e2 Allow user to specify path to Eigen3 library
By setting EIGEN3_ROOT, we can point directly to the path of the
library checkout we want to use. No other searching will then take
place.

Notice that if you have found an Eigen3 installation in a previous
configure, it will not find a new version even if you introduce the
EIGEN3_ROOT variable!
2013-06-25 14:49:11 +02:00
Atgeirr Flø Rasmussen
6a2b21e04b Refine OpmFind according to Roland Kaufmann's suggestions.
This enables us to restore FindEigen3.cmake to its original
state (as copied from Eigen sources).
2013-05-16 14:18:59 +02:00
Atgeirr Flø Rasmussen
d59363d681 Now Eigen is found properly. 2013-05-16 10:49:05 +02:00
Atgeirr Flø Rasmussen
db95420b98 Add FindEigen3 cmake module. Currently unused. 2013-05-16 10:28:25 +02:00
Bård Skaflestad
116f39e8ab Import CMake support from OPM-Core 2013-05-15 10:24:52 +02:00