/[gentoo-x86]/dev-util/cmake/files/cmake-2.8.7-FindLAPACK.patch
Gentoo

Contents of /dev-util/cmake/files/cmake-2.8.7-FindLAPACK.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Mar 9 01:22:06 2012 UTC (2 years, 6 months ago) by dilfridge
Branch: MAIN
CVS Tags: HEAD
Respect pkg-config library path also in FindLAPACK, bug 399755; thanks to Christoph Junghans for the patches

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 diff -ruN cmake-2.8.7.orig/Modules/FindLAPACK.cmake cmake-2.8.7/Modules/FindLAPACK.cmake
2 --- cmake-2.8.7.orig/Modules/FindLAPACK.cmake 2011-12-30 17:49:56.000000000 +0100
3 +++ cmake-2.8.7/Modules/FindLAPACK.cmake 2012-03-09 02:15:46.000000000 +0100
4 @@ -1,3 +1,9 @@
5 +#
6 +# Version modified for Gentoo Linux
7 +# If a valid PkgConfig configuration is found, this overrides and cancels
8 +# all further checks.
9 +#
10 +
11 # - Find LAPACK library
12 # This module finds an installed fortran library that implements the LAPACK
13 # linear-algebra interface (see http://www.netlib.org/lapack/).
14 @@ -36,6 +42,24 @@
15 # (To distribute this file outside of CMake, substitute the full
16 # License text for the above reference.)
17
18 +#
19 +# first, try PkgConfig
20 +#
21 +find_package(PkgConfig REQUIRED)
22 +pkg_check_modules(PC_LAPACK lapack)
23 +if(PC_LAPACK_FOUND)
24 + foreach(PC_LIB ${PC_LAPACK_LIBRARIES})
25 + find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_LAPACK_LIBRARY_DIRS} )
26 + if (NOT ${PC_LIB}_LIBRARY)
27 + message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_LAPACK_LIBRARY_DIRS}")
28 + endif (NOT ${PC_LIB}_LIBRARY)
29 + list(APPEND LAPACK_LIBRARIES ${${PC_LIB}_LIBRARY})
30 + endforeach(PC_LIB)
31 + find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARIES)
32 + mark_as_advanced(LAPACK_LIBRARIES)
33 +else(PC_LAPACK_FOUND)
34 +message(STATUS "No PkgConfig configuration for LAPACK found; starting more extensive search.")
35 +
36 set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
37
38 get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
39 @@ -305,3 +329,5 @@
40 endif(BLA_F95)
41
42 set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
43 +
44 +endif(PC_LAPACK_FOUND)

  ViewVC Help
Powered by ViewVC 1.1.20