Commit Graph

21 Commits

Author SHA1 Message Date
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
0eb46b567d Indicate failure to find header with blank string
Use empty string instead of zero, so it can be tested with #ifdef as
well as #if in the C++ source code.
2013-03-19 13:06:43 +01:00
Bård Skaflestad
fb9e09063c Merge pull request #193 from rolk/193_arch
Don't search in architecture-irrelevant directories
2013-03-13 03:41:29 -07: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
58dd4fd7b4 Include standard math runtime library when linking numerics 2013-03-13 00:01:41 +01:00
Roland Kaufmann
1e765a2f29 Don't probe for umfpack with cholmod unless latter is found 2013-03-12 12:22:57 +01:00
Roland Kaufmann
9328cb896e Protect against underlinking of UMFPACK library
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.
2013-02-19 13:15:00 +01:00
Atgeirr Flø Rasmussen
c58b4684b3 Use more functions in testing found umfpack
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.
2013-02-11 23:08:28 +01:00
Roland Kaufmann
c28950c0f8 Link to core function to get more realistic test
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).
2013-02-11 23:06:38 +01:00
Roland Kaufmann
fdff36fcbf Use full set of dependencies when test compiling
The old implementation erraneously used only the first argument that was
passed to the testing procedure due to the way lists are passed in CMake
when unquoted. Thus, the test failed for SuiteSparse >= 4.0 which needs
more than one dependency.

Also add dependency to BLAS and LAPACK which was hidden because the
caller already included these itself.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
718fce9e2a Add realtime library on Linux, if SuiteSparse >= 4.0
Functions in the helper library is dependent on librt
2013-02-11 23:06:37 +01:00
Roland Kaufmann
4dbefc603a Look for packages from underneath a single root
Previous implementation had a separate search path for headers and for
the library, which in the case of "RedHat-multiarch" made it miss the
library (it was looking for /usr/lib/lib64 instead of /usr/lib64); the
new version starts looking from /usr.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
5772f7a5c2 Explicitly specified paths should replace predefined ones
We don't want a typo in any of those to accidentially make the
configuration pick up the system libraries instead.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
668cf14059 Add config library new to SuiteSparse 4.0
SuiteSparse 4.0 implements many of its internals in a separate helper
directory which must also be linked if this is present.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
f8d047d4db Try to do without unnecessary dependencies
UMFPACK is by default dependent on CHOLMOD, but on some systems it is
compiled with -DNCHOLMOD; in those cases we should not try to link in
the library -- it may not be available and in any cases it is not used,
so it is just a superfluous dependency.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
172e9b3e33 Bail out if none of the required components are found
The way the test was written earlier, it would accept if it found
components that were transitively pulled in even if the originally
requested component was not!
2013-02-11 23:06:37 +01:00
Roland Kaufmann
ceeba95ba7 Assume that UMFPACK requires CHOLMOD by default
At this time no probe is added to check if an UMFPACK without dependency
to CHOLMOD is installed; thus if you need/want UMFPACK, you'll have to
go for the entire SparseSuite.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
61cdf5c1d6 Search for libraries on multi-arch distributions 2013-02-11 22:38:02 +01:00
Roland Kaufmann
dc92805d9a Safe-guard against empty directories
CMake will raise an error if you try to remove something from an
unset variable (whereas removing something from an empty list "" is
fine). If the user doesn't have the appropriate library, the search
will turn out empty, and the configuration will fail with a syntax
error instead of a message that the library is not found.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
5a14e481fb Let SuiteSparse path be specified without config mode
Use the _ROOT suffix to direct the CMake module to use a particular path
to the SuiteSparse installation without also triggering config mode (by
convention CMake uses Foo_DIR as the name of the variable which
specifies where to look for another *project*).
2013-02-11 22:37:58 +01:00
Roland Kaufmann
751c721c55 Probe for SuiteSparse libraries
Search for modules in this library in the same style as Boost; by
specifying a list of components. If all on the list is present, then
a list of libraries to link with, is returned.
2013-02-11 22:36:48 +01:00