Commit Graph

3505 Commits

Author SHA1 Message Date
Andreas Lauser
054c353606 add test for <type_traits> to FindCXX11Features.cmake
I fogot this one yesterday...
2013-08-13 21:02:52 +02:00
Andreas Lauser
41b7b316f7 add and use CMake modules for valgrind client requests and quadruple precision math 2013-08-13 21:00:18 +02:00
Bård Skaflestad
d13054e4e2 Merge pull request #313 from andlaus/use_std_shared_ptr
Use std shared ptr
2013-08-13 01:22:34 -07:00
Bård Skaflestad
876fa56489 Merge pull request #316 from rolk/316_material
OPM Porsol now depends on OPM Material
2013-08-12 01:54:44 -07:00
Roland Kaufmann
771fdbc3a9 OPM Porsol now depends on OPM Material
In the new build scheme, the prerequisites of each module is declared
in this file as the canonical version, and everything else includes it.
2013-08-09 22:15:19 +02:00
Andreas Lauser
bd094b2e11 replace boost::scoped_ptr by std::unique_ptr
thanks to Bård Skaflestad, Atgeirr Rasmusen and Roland Kaufmann for
the hint.
2013-08-08 15:21:38 +02:00
Andreas Lauser
cab7125da3 also test for std::unique_ptr 2013-08-08 15:21:13 +02:00
Andreas Lauser
6722ca33f5 add a few config.h macros useful for dune-common 2013-08-08 13:40:42 +02:00
Andreas Lauser
70949c6edb use std::shared_ptr instead of boost::shared_ptr
our policy is that we only use boost if necessary, i.e., if the oldest
supported compiler does not support a given feature but boost
does. since we recently switched to GCC 4.4 or newer, std::shared_ptr
is available unconditionally.
2013-08-08 13:25:58 +02:00
Andreas Lauser
b0349793fa detect the presence of std::shared_ptr
since GCC 4.4 supports it, make it mandatory as well...
2013-08-08 13:25:58 +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
Bård Skaflestad
65dc3224b0 Merge pull request #312 from rolk/312_nolib
Allow several options to be used even if we don't have a library
2013-08-08 01:22:16 -07:00
Roland Kaufmann
262b0f7619 Only configure libtool for libraries that exist 2013-08-08 10:09:08 +02:00
Roland Kaufmann
6149756f3c Only build before library target if there is any 2013-08-08 10:09:08 +02:00
Roland Kaufmann
83becba87b Allow PCH option to be on even if there is no library 2013-08-08 10:08:50 +02:00
Bård Skaflestad
07dcca3917 Merge pull request #311 from rolk/311_material
Find module for opm-material
2013-08-08 00:40:26 -07:00
Roland Kaufmann
c1acffcd90 Upgrade Findopm-material to use separate prerequisite list
This will now be included both by the find module and by the project
file itself.
2013-08-08 00:11:49 +02:00
Roland Kaufmann
6e38909b49 Module mode CMake probe for opm-material 2013-08-07 23:19:06 +02:00
Bård Skaflestad
8e63169073 Merge pull request #310 from andlaus/allow-nolib
Build system: make it work for modules which do not need libraries
2013-08-07 08:12:47 -07:00
Andreas Lauser
0d14d25ef5 Build system: make it work for modules which do not need libraries 2013-08-07 16:06:05 +02:00
Bård Skaflestad
d67f0c74d4 Merge pull request #309 from rolk/309_clean
Have distclean target keep up with build improvements
2013-08-07 01:20:36 -07:00
Roland Kaufmann
0d2b7e63e7 Have distclean target keep up with build improvements
If you run `cmake --build . -- distclean` all generated files will
now be gone! This adds the files that have been introduced in later
improvements to the build system.
2013-08-07 10:08:58 +02:00
Bård Skaflestad
273d70bebb Merge pull request #307 from rolk/307_clang
Recognize Clang to be a GCC-compatible compiler
2013-08-06 14:25:16 -07:00
Roland Kaufmann
aa4b7979a7 Recognize Clang to be a GCC-compatible compiler
Clang aims to be compatible with GCC when it comes to command-line
parameters. Where we enable functionality based on the presence of
a GCC-compiler, we can use the same functionality with Clang.

This patch introduces a new variable CXX_COMPAT_GCC which is true if
the compiler handles the same options as GCC, and this variable is
subsequently used in tests instead of CMAKE_COMPILER_IS_GNUCXX (which
remains if we need to test if we really have GCC, e.g. for version)
2013-08-06 23:06:09 +02:00
Bård Skaflestad
1168d19b43 Merge pull request #306 from rolk/306_ninja
Enable support for Ninja build generator
2013-08-06 13:48:05 -07:00
Roland Kaufmann
ec45e78a77 Enable support for Ninja build generator
Use the Ninja build generator if '--enable-ninja' is passed on the
command line to ./configure (or of course if -GNinja is passed
directly to CMake).
2013-08-06 22:13:44 +02:00
Bård Skaflestad
4557625b04 Merge pull request #305 from rolk/305_openmp
Provide a define for having OpenMP
2013-08-06 12:54:51 -07:00
Roland Kaufmann
2aced6ea25 Fix bug in determining if directory is found
The parenthesis is to make it less ambiguous how the boolean expression
should be evaluated.
2013-08-06 00:04:08 +02:00
Roland Kaufmann
aa01cf3014 Make available version numbers for these modules 2013-08-06 00:04:08 +02:00
Roland Kaufmann
ba16f55b7f Probe DUNE module version number from installation
Figure out where the closest dune.module is, and parse it for
information. The defines are added to config.h, so that our code
may behave differently for various versions available.

It actually works for opm-core 1.0 as well, but don't tell anyone;
we rather want people to use opm/core/version.h instead.

If a module has been backported and installed to a directory which
also contains the version number, e.g. /usr/include/dune-2.3, to
avoid clashing with an existing version in /usr/include, then this
part is now stripped from the include directory and added back to
the lib directory where we are looking for dune.module
2013-08-06 00:04:07 +02:00
Roland Kaufmann
f37e8cc402 Provide a define for having OpenMP 2013-08-05 21:54:31 +02:00
Roland Kaufmann
22a70f1438 Give template for adding version requirement 2013-08-05 21:09:09 +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
Bård Skaflestad
4a4f7c379f Merge pull request #303 from rolk/303_libless
Add support to the build system for building header-only modulesi
2013-08-02 14:47:38 -07:00
Bård Skaflestad
f0d6a2e1c5 Merge pull request #302 from rolk/302_attic
Put old "non-unit-tests" in the attic instead
2013-08-02 14:34:21 -07:00
Bård Skaflestad
dcc0d6ff3b Merge pull request #301 from rolk/301_verteq
Add find module for opm-verteq to build system
2013-08-02 14:22:42 -07:00
Roland Kaufmann
26b910317a Only make target if there is any source files
If there is no source files, we set a blank target to signal to the
other components of the build system that they shouldn't be looking
for a library.
2013-08-02 21:55:57 +02:00
Roland Kaufmann
dd0d7425d1 Only include library if there is one 2013-08-02 21:55:51 +02:00
Roland Kaufmann
3ded5f5253 Don't install debug syms for a library that isn't there 2013-08-02 21:55:44 +02:00
Roland Kaufmann
2f0c6ea8a1 Issue warning about the status of files in the attic 2013-08-02 20:33:27 +02:00
Roland Kaufmann
fa5344ec3e Move old files into the attic
The attic are the place where files which we don't use right now, but
which we acknowledge some amount of valuable time has been spent on and
which may be usable some day in the future, so we don't have the
conscience to right out delete them.

These files are not expected to compile, and certainly not to run and
produce sensible results, anymore. However, with some work they can
possibly be converted into proper unit tests or examples.
2013-08-02 20:31:06 +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
Roland Kaufmann
0a7351a730 Use new style of prerequisite declaration
The prerequisites are now declared in their own file, so it can be
included by the main system. There is thus only one canonical place
where the list of prerequisites exist.
2013-08-02 20:08:15 +02:00
Bård Skaflestad
53dab38e31 Merge pull request #297 from rolk/297_version
Make version number available to client code
2013-08-02 10:32:50 -07:00
Bård Skaflestad
dc859e30ac Merge pull request #300 from rolk/300_precomp
Further classify source files into languages

Needed, for instance, to properly assign derived properties to a subset
of the sources.  
  
This feature is used in the PCH module (UsePrecompHeaders.cmake)
2013-08-02 09:53:28 -07:00
Roland Kaufmann
88de0e6799 Provide CMake find module to locate opm-verteq 2013-08-02 14:58:52 +02:00
Roland Kaufmann
944935b0a3 Further classify source files into languages
Other modules (notably the precompiled header one) may set properties
directly on the source file; we need to separate them into categories
for which language they belong to.
2013-08-02 14:52:25 +02:00
Roland Kaufmann
e3638f770f Safe-guard against version mismatch
The version declared for the build system (in dune.module) is checked
against what is in the source (e.g. opm/core/version.h) and if these
don't match, then issue an author warning.

This will help us keep the two version numbers in sync., since it
becomes very obvious when we don't. The benefit for this is to not have
the build system start mucking with the code just to dump some static
information in there.
2013-08-02 10:24:49 +02:00
Roland Kaufmann
99eca2a247 Name #defines to be compatible with DUNE macros 2013-08-02 09:03:49 +02:00