Most of the file is not changed from some sensible default anyway, so we
can store this in the template directory and have a much more manageable
local file which just contains the relevant changes.
The WORKING_DIRECTORY property wasn't added until 2.8.4; for versions
earlier than that we provide a work-around. On newer versions we set the
property since some other components may use it.
If libumfpack.so does not declare an explicit dependency on libamd.so,
the linker option -Wl,--as-needed will cause an undefined reference
since we don't use libamd.so ourself. If the configuration determines
that this may be the case, a linker option that forces linking the the
AMD library is added for the SuiteSparse library, and the general
configuration then gets out of the way if this is set.
Not all Linux distributions is LSB-compliant, notably RHEL 6, so we
should make an effort to check various known other files in order to
identify the distribution.
The probe for Boost was changed in CMake 2.8; if the system has
installed configuration files tailored for an older CMake, the
library paths are not setup correctly. This patch disables using
those configuration files; just use the library directly instead.
The HAVE_UMFPACK_WITHOUT_CHOLMOD test would generate a false success.
New test contains program with more calls to the umfpack API, reflecting
our actual usage.
This will hopefully guide some (buggy) compiler variants to not start
interpreting the header as a full program, or at least give a more
sensible error message.
Templates can now be reused across projects. The output files are still
put in the root of the output tree because that is where the client
programs will look for them.
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.
Using umfpack_dl_solve as a test function increases the chance that the
probe will not be able to link successfully if it has not found all
libraries necessary (to link other than trivial test programs).
These files are text files which specify which platform specific
libraries we should be looking for. We need libtool installed to
use them, but they can be generated pretty inexpensively from the
CMake script itself.
There is a convention that one can do `pkg-config --variable=includedir`
and have it return the path to the source files (even if that should
have been taken care of by options in --cflags).