A substring can of course not be longer that the full string. Also fixes
problems with CMake-versions that doesn't handle out-of-range parameters
to the SUBSTRING sub-command.
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.
dunecontrol will check for a dune.module file to regard the directory
as containing the module. If we put this is a sub-dir of the source,
it will get confused, so we shouldn't. There shouldn't be any
conflicting use-cases, as one cannot have several modules in the sub-
directory of one source (!?).
Instead of having the name of the module set for each flag, use the
available standard option. Mixing shared objects and static libraries
in the same build is not a very realistic scenario anyway.
This enables us to call configure without actually having a particular
module; the script may then be used on a group level.
This duplicates functionality from the old autotools implementation
in case any user code needs it. It is not necessary to build the
OPM modules themselves.
opm-core contains code which has #pragma omp. Earlier, OpenMP was
detected as part of the probe for ERT. However, that probe got
smarter, and as a result doesn't probe for more than it needs. Thus,
we need to check for OpenMP explicitly in opm-core. (It is disabled
by default)
Some distributions modify -dumpversion so that it only returns major
and minor numbers, not the patch level. This is usually OK for
determining features, but when debugging the output log, we really
want the full number.
If support for OpenMP should be added, it must be specified by
setting an option. If not, then warnings for unknown pragmas are
disabled, so that the code can have #pragma omp witout getting
messages during build.
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!
If the directory that is specified does not exist, then keep the path
as entered, which makes for better error messages later.
We cannot print an warning on a non-existent name, because it may be
target directories that are specified, or perhaps logical options
(like --with-mpi=yes)