/[gentoo-x86]/dev-util/cmake/files/cmake-2.8.11-FindBLAS.patch
Gentoo

Contents of /dev-util/cmake/files/cmake-2.8.11-FindBLAS.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Jun 9 12:05:26 2013 UTC (10 months, 1 week ago) by johu
Branch: MAIN
CVS Tags: HEAD
Version bump by several people in kde overlay. Fixes bug bug #436540.

(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key F3CFD2BD)

1 --- b/Modules/FindBLAS.cmake
2 +++ a/Modules/FindBLAS.cmake
3 @@ -1,3 +1,9 @@
4 +#
5 +# Version modified for Gentoo Linux
6 +# If a valid PkgConfig configuration for blas is found, this overrides and cancels
7 +# all further checks.
8 +#
9 +
10 # - Find BLAS library
11 # This module finds an installed fortran library that implements the BLAS
12 # linear-algebra interface (see http://www.netlib.org/blas/).
13 @@ -40,6 +46,26 @@
14 # (To distribute this file outside of CMake, substitute the full
15 # License text for the above reference.)
16
17 +#
18 +# first, try PkgConfig
19 +#
20 +find_package(PkgConfig REQUIRED)
21 +pkg_check_modules(PC_BLAS blas)
22 +if(PC_BLAS_FOUND)
23 + foreach(PC_LIB ${PC_BLAS_LIBRARIES})
24 + find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_BLAS_LIBRARY_DIRS} )
25 + if (NOT ${PC_LIB}_LIBRARY)
26 + message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_BLAS_LIBRARY_DIRS}")
27 + endif (NOT ${PC_LIB}_LIBRARY)
28 + list(APPEND BLAS_LIBRARIES ${${PC_LIB}_LIBRARY})
29 + endforeach(PC_LIB)
30 + find_package_handle_standard_args(BLAS DEFAULT_MSG BLAS_LIBRARIES)
31 + mark_as_advanced(BLAS_LIBRARIES)
32 +else(PC_BLAS_FOUND)
33 +message(STATUS "No PkgConfig configuration for BLAS found; starting more extensive search.")
34 +
35 +
36 +
37 include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
38 include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
39
40 @@ -604,3 +630,8 @@
41 endif()
42
43 set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
44 +
45 +
46 +endif(PC_BLAS_FOUND)
47 +
48 +

  ViewVC Help
Powered by ViewVC 1.1.20