Commit Graph

3478 Commits

Author SHA1 Message Date
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
f37e8cc402 Provide a define for having OpenMP 2013-08-05 21:54:31 +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
Bård Skaflestad
900a21adb3 Merge pull request #296 from rolk/296_runpath
Embed original dependency paths in installed library
2013-08-01 09:36:54 -07:00
Andreas Lauser
667f056a73 Merge pull request #295 from rolk/295_cxxreq
Only fail if C++11 support is noted as REQUIRED
2013-08-01 06:33:05 -07:00
Roland Kaufmann
db90eff1c6 OPM Core uses C++11 features as of commit 562bcf2 2013-08-01 15:13:56 +02:00
Roland Kaufmann
e5fc56ee83 Exempt distribution packages from having RUNPATH
Files that are distributed as packages should always assume that all
the other libraries it depends on is as packages too, in the system
directories, so there is no need to have a RUNPATH embedded in them.
2013-08-01 14:32:59 +02:00
Roland Kaufmann
b46441085a Use RUNPATH in installed library by default
When checking out from source code, the paths that were used to
configure the project should be carried on to the installed binary,
so the same libraries are used without much effort.

By using RUNPATH instead of (just) RPATH, it can be overridden with
LD_LIBRARY_PATH if the user so desires.
2013-08-01 14:29:04 +02:00
Roland Kaufmann
e9874b75a4 Revert "Demote consequence of not having C++11 support"
This reverts commit d6c2e52d63. The C++11
find module now checks for the necessary level.
2013-08-01 13:44:27 +02:00
Roland Kaufmann
0ed0ac61e9 Only display an error message if C++11 support is noted as REQUIRED 2013-08-01 13:44:27 +02:00
Bård Skaflestad
92fca433be Merge pull request #294 from rolk/294_unittests
Fix non-unit tests so they compile again
2013-08-01 03:36:10 -07:00
Roland Kaufmann
348da6ba32 Indent consistently with whitespace instead of tab 2013-08-01 12:16:20 +02:00
Roland Kaufmann
d400b2e7fd Rename test itself to not conflict with local variable 2013-08-01 12:14:23 +02:00
Roland Kaufmann
404413a226 Insert remainder to keep version number is sync. 2013-08-01 11:27:22 +02:00
Roland Kaufmann
f2f199258d Define API version macros for other code to query
Note the distinction between the version (1.0) and the release label
(2013.03). The latter is not really usable to check for API
compatibility. (See <http://www.semver.org>).
2013-08-01 11:26:10 +02:00
Roland Kaufmann
5d1931cb7d Add warning that this directory is not actively maintained. 2013-08-01 10:46:01 +02:00
Roland Kaufmann
5180f9faf0 Graduate testing of metric unit to a proper unit test
Notice the confusing naming.
2013-08-01 10:40:55 +02:00
Roland Kaufmann
cc84b584ff Convert testing of metric units to use Boost::UnitTest 2013-08-01 10:40:55 +02:00
Roland Kaufmann
3bd2f07d9c Convert cubic interpolator to use Boost::UnitTest 2013-08-01 10:40:55 +02:00
Roland Kaufmann
67baa6b8e2 Cartesian grid test is now a proper unit test 2013-08-01 10:40:55 +02:00
Roland Kaufmann
6fc2ff197a Convert Cartesian grid test to use Boost::UnitTest 2013-08-01 10:40:55 +02:00
Roland Kaufmann
47f0b97fcc Graduate these tests to unit tests
Although they don't use Boost::UnitTest, they can at least pass, so we
can use them to detect simple compilation and runtime errors, although
we miss the semantic check.

(If you have time, please make them proper unit tests)
2013-08-01 10:40:55 +02:00
Roland Kaufmann
f6bfb58d45 Fix non-unit tests so that they compile again
Account for header, namespace and API changes.
2013-08-01 10:40:55 +02:00
Bård Skaflestad
e9b5a55b4b Merge pull request #293 from rolk/293_wogit
Make project buildable also without Git
2013-07-31 06:37:12 -07:00
Roland Kaufmann
1a04ae5125 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-07-31 15:08:51 +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
Bård Skaflestad
93afe5fbb6 Merge pull request #291 from rolk/291_ertdep
Probe again later if ERT isn't found now
2013-07-31 05:19:47 -07:00
Roland Kaufmann
0e8b8191a9 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-07-31 14:17:41 +02:00
Roland Kaufmann
b53ba15a84 Let the AutoTools script disable tests and samples also 2013-07-31 14:13:56 +02: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