Commit Graph

457 Commits

Author SHA1 Message Date
Roland Kaufmann
0bac3406dd Only display an error message if C++11 support is noted as REQUIRED 2013-08-14 23:39:04 +02:00
Roland Kaufmann
046a4e6048 Make project buildable also without Git
If Git is not found, revert to just dumping the label into the code.
(We currently have no way of getting the SHA into the tarball).
2013-08-14 23:39:04 +02:00
Roland Kaufmann
c52e62ce88 Probe again later if ERT isn't found now
If we write a blank value into the cache, we tell CMake that ERT isn't
found and it won't check again. If we delete it from the cache in case
we didn't find the directories, then CMake will run the find module
again the next time we configure. Just probing for directories is cheap
so this is no problem. This allows us to install ERT, do a reconfigure
and it will then be picked up by the build system.

If we find ERT and it doesn't compile properly, a blank value will still
be written, and it won't try again the next time, so you must wipe the
cache if you *upgrade* ERT into a newer and more compatible version.
2013-08-14 23:39:04 +02:00
Roland Kaufmann
51c31938b9 Let the AutoTools script disable tests and samples also 2013-08-14 23:39:04 +02:00
Roland Kaufmann
10bc6cd081 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-08-14 23:39:03 +02:00
Roland Kaufmann
7900b3bbfc 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-08-14 23:39:03 +02:00
Roland Kaufmann
48a0099190 Don't update version info in Debug mode
It gets tiresome to rebuild the project everytime one makes changes to
any of the unit tests. We don't likely publish results based on the
debug code anyway, so tracking the version number there is not such a
pressing issue.
2013-08-14 23:39:03 +02:00
Roland Kaufmann
e8e310dfba Make sure that version info is updated before building code
Otherwise, the library may be declared "done" before the version number
process have had any change to touch files it depends upon. This ensures
that the version number is correct before we start building the library.
2013-08-14 23:39:03 +02:00
Roland Kaufmann
be7b392690 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-08-14 23:39:03 +02:00
Roland Kaufmann
d16fbf463e Read the label from project info 2013-08-14 23:39:03 +02:00
Roland Kaufmann
76eaf3fc22 Strings must contain ONLY numbers to be integers
The old pattern matched if there was an integer (digit) in the string;
it would have to be all non-digits to be quoted.
2013-08-14 23:39:03 +02:00
Roland Kaufmann
6fa44b6f23 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-08-14 23:39:03 +02:00
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
48a1e36914 Revert "New sentence -> capital first letter."
This reverts commit 970f308f59.
2013-08-14 23:02:19 +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
Roland Kaufmann
1a63243419 Compatibility module for dunecontrol-driven clients
If a client generated with duneproject/built with dunecontrol has a
dependency to opm-autodiff, the macros defined in this file is expected
to exist and will be called to search for the opm-autodiff library.

All that is done here is to use the pkg-config helper module and
import the configuration that was written by the CMake system (which
even may have been called earlier in the same dunecontrol "session")
2013-08-14 22:47:24 +02:00
Roland Kaufmann
d2286f33eb Library to pick up configuration from pkg-config files
Pkg-config files are written as part of the CMake configuration, and
these can be imported into AutoTools-driven projects to get the correct
compiler and linker options that has been probed.
2013-08-14 22:45:33 +02:00
Bård Skaflestad
cb20a8cc74 Merge pull request #22 from jnygaard/scalar_mult
Scalar mult
2013-08-05 01:09:08 -07:00
Jens Olav Nygaard
383b88252a Modified according to comments in pull-request discussion. 2013-08-05 09:47:47 +02:00
Jens Olav Nygaard
d3a02e4891 Added ForwardBlock operator* for scalars. 2013-08-02 12:24:12 +02:00
Jens Olav Nygaard
23e2034118 Testing workflow with upstream + local repo.
Added template for unit test for new feature.
Updated (CMake's) list of unit tests.
2013-08-01 15:43:21 +02:00
Bård Skaflestad
d92849b419 Merge pull request #21 from andlaus/gcc-4.4
Gcc 4.4
2013-07-30 13:27:53 -07: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
Bård Skaflestad
77193550a6 Merge pull request #19 from akva2/opm_depends
fixed: autodiff depends on opm-core
2013-07-10 07:26:06 -07:00
Arne Morten Kvarving
c2b0bb1fbb fixed: autodiff depends on opm-core 2013-07-10 16:01:51 +02:00
Bård Skaflestad
9ae786a324 Merge pull request #18 from akva2/eigen3_fix_continuous_installs
fixed: workaround issues with ExternalProject_Add
2013-07-10 01:58:07 -07:00
Arne Morten Kvarving
29d7e2a323 fixed: workaround issues with ExternalProject_Add
if you use the builtin git update command, a build is triggered
every time. instead, manually use a checkout
2013-07-10 09:57:57 +02:00
Alf Birger Rustad
0c628c5ed7 Merge pull request #17 from bska/optional-umfpack
Use UMPACK only if available
2013-07-09 05:53:26 -07:00
Bård Skaflestad
a9b90b34f8 Use UMFPACK solver if available in sim_simple.cpp.
Fall back to Eigen's BiCGSTAB solver if UMFPACK is not available.  The
BiCGSTAB is built into Eigen and consequently always available when
Eigen is found.
2013-07-09 14:39:44 +02:00
Bård Skaflestad
e9ad8f0b5e Merge remote-tracking branch 'andlaus/no-umfpack' into optional-umfpack 2013-07-09 14:34:08 +02:00
Alf Birger Rustad
d326a7657e Merge pull request #15 from bska/optional-umfpack
Exclude examples/sim_simple.cpp if UMFPACK is unavailable
2013-07-09 05:07:08 -07:00
Bård Skaflestad
09bd9a44ac Fix mismerge in commit b54df70.
We lost the SuiteSparse detection.
2013-07-09 13:54:47 +02:00
Bård Skaflestad
b54df706a9 Merge branch 'master' into optional-umfpack
Conflicts:
	CMakeLists.txt

Import akva2's modified Eigen support.
2013-07-09 13:50:45 +02:00