Commit Graph

12 Commits

Author SHA1 Message Date
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
b6cdc06b7a Don't search system directories when path given
If the user has given a path to the module, then the system paths should
not be searched, as these may contain an old and outdated version. We
don't necessarily want that just because there was a problem with our
own installation!
2013-03-20 09:33:35 +01:00
Roland Kaufmann
ac861580d7 Don't search in architecture-irrelevant directories
If we are on a 64-bits machine, there is no point in searching lib32
and conversely. Quite the opposite, it can only end badly if a library
is actually found in the wrong architecture directory.
2013-03-13 10:38:27 +01:00
Roland Kaufmann
8946c17330 Determine that ERT is not found, faster
Instead of checking every pre-requisite and then determine if the
library is functional, quickly check if the library directories are
present, and if not bail out. The most common reason that ERT is
not usuable, is that it is installed, not that something else is
missing!
2013-03-06 22:18:21 +01:00
Roland Kaufmann
35353befb2 Handle ERT not found condition gracefully
If the files for ERT is not found, then the find module cheats and
indicates that it didn't compile either (since there are some later
tests for HAVE_ERT).

However, erraneously, it gave this variable the value 0, which tests
for false in the CMake code but not in the #ifdef checks in the C++
code. This error is cancelled in opm-core by the fact that it didn't
store it as a cache variable, but resurfaced in opm-polymer when it
probes the second time (as both opm-core as a dependency and
opm-polymer itself declare a dependency on ERT).

It is now stored in a way that should be satisfactory to both
projects.
2013-03-06 13:31:04 +01:00
Roland Kaufmann
e50c564425 Separate inclusion of OpenMP library into reusable module
Other projects (which does not have a direct dependency on ERT) require
OpenMP; we desire to reuse this functionality into those projects.
2013-03-05 13:52:52 +01:00
Roland Kaufmann
911bf9593f Do not duplicate handling of duplicate libraries
There were (at least) three implementations of the same macro; these
have been collected into a separate helper module. (Note that this
means that FindERT is now not completely stand-alone anymore).
2013-03-05 13:50:58 +01:00
Roland Kaufmann
a160847dfb Check for both headers and libs before making test prog
Previously, it was assumed that the project was available if only the
libraries were found (either by full compile, or by package).
2013-02-13 09:30:08 +01:00
Roland Kaufmann
33f3bc29e7 Allow in-source builds of ERT in sibling directory
The source code of ERT is located in a devel/ subdirectory, but it is
not usual (?) to have this structure in a separate build directory as
well. If you however build everything in the same directory as the
source code, then this sub-directory needs to be accounted for.
2013-02-11 23:06:38 +01:00
Roland Kaufmann
f89ad15fe9 Include CMakePushCheckState on our own
Functions in this library was made available by other unrelated
modules, making this file unusable on its own.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
2e1f2f3ffb Search for ERT library in updated locations
ERT project has recently changed the output locations due to packaging
efforts.
2013-02-11 22:38:02 +01:00
Roland Kaufmann
2e7e07e17d Find module for Ensemble-based Reservoir Tools (ERT)
Although ERT is built with CMake, it does not yet provide a config-mode
module in its build directory. This also means that the find module must
be pointed to an installation, not a build directory.
2013-02-11 22:37:56 +01:00