MantisBT - CMake
View Issue Details
0014740CMakeCMakepublic2014-02-06 17:082016-06-10 14:31
Philipp Möller 
Kitware Robot 
normalfeaturealways
closedmoved 
CMake 2.8.12.1 
 
0014740: Teach FindLAPACK to find lapack-config.cmake, maybe add FindLAPACKE
The FindLAPACK module does not export a LAPACK_INCLUDE_DIR variable, which makes it necessary for most projects to ship their own version of FindLAPACK.
Install LAPACK in a custom location. Try to use FindLAPACK.
No tags attached.
Issue History
2014-02-06 17:08Philipp MöllerNew Issue
2014-02-07 09:21Brad KingNote Added: 0035051
2014-02-07 09:30Philipp MöllerNote Added: 0035052
2014-02-07 09:45Brad KingNote Added: 0035053
2014-02-10 10:45Brad KingNote Added: 0035081
2014-02-10 10:49Brad KingNote Added: 0035082
2014-02-10 10:49Brad KingSeverityminor => feature
2014-02-10 10:49Brad KingStatusnew => backlog
2014-02-10 10:49Brad KingSummaryFindLAPACK does not export LAPACK_INCLUDE_DIR => Teach FindLAPACK to find lapack-config.cmake, maybe add FindLAPACKE
2016-06-10 14:29Kitware RobotNote Added: 0042479
2016-06-10 14:29Kitware RobotStatusbacklog => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035051)
Brad King   
2014-02-07 09:21   
Which distribution of LAPACK are you using and what header files do you expect to be found?
(0035052)
Philipp Möller   
2014-02-07 09:30   
I would usually expect the LAPACKE headers to be found. It seems LAPACKE only became a part of the standard LAPACK distribution starting with Release 3.5.0 http://www.netlib.org/lapack/lapack-3.5.0.html [^]

I think there are two ways to handle this: provide FindLAPACKE or include the check for the include directory given the version of LAPACK is >= 3.5.0
(0035053)
Brad King   
2014-02-07 09:45   
The upstream reference implementation of LAPACK builds with CMake and distributes a lapack-config.cmake package configuration file. This allows CMake to find LAPACK without a FindLAPACK module. Applications can write

 find_package(LAPACK NO_MODULE)

to skip the CMake-provided FindLAPACK module and simply search for lapack-config.cmake with a single LAPACK_DIR cache entry. Then that file is loaded and is responsible for providing all information.

We need to work with upstream LAPACK to provide the include directory in their lapack-config.cmake file (or perhaps a separate lapacke-config.cmake file).
(0035081)
Brad King   
2014-02-10 10:45   
Upstream reference lapack:

 https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk [^]

revision r1472 now provides a lapacke package configuration file so one can write

 find_package(LAPACKE NO_MODULE REQUIRED)
 include_directories(${LAPACKE_INCLUDE_DIRS})
 add_executable(myexe myexe.c)
 target_link_libraries(myexe ${LAPACKE_LIBRARIES})

and work with no modifications to CMake.
(0035082)
Brad King   
2014-02-10 10:49   
FindLAPACK should to be taught to try to the reference lapack's package configuration file instead of looking only for the individual pieces.

Since the reference lapack is not the only implementation we may still need a FindLAPACKE that works similarly.
(0042479)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.