[Cmake-commits] CMake branch, next, updated. v2.8.7-2531-g64dc971

Alexey Ozeritsky aozeritsky at gmail.com
Thu Feb 9 01:45:58 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  64dc9710d533f076b2f1cfe3201beba5e0998e64 (commit)
       via  e69e816d21732b092b33ff7d36b7cc478350344e (commit)
      from  267cc72af16065a85f935d6e046d6cf8a604fc28 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64dc9710d533f076b2f1cfe3201beba5e0998e64
commit 64dc9710d533f076b2f1cfe3201beba5e0998e64
Merge: 267cc72 e69e816
Author:     Alexey Ozeritsky <aozeritsky at gmail.com>
AuthorDate: Thu Feb 9 01:45:55 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 9 01:45:55 2012 -0500

    Merge topic 'findblas-bugs' into next
    
    e69e816 FindBLAS/FindLAPACK: 0012924 fixed, 0012925 fixed


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e69e816d21732b092b33ff7d36b7cc478350344e
commit e69e816d21732b092b33ff7d36b7cc478350344e
Author:     Alexey Ozeritsky <aozeritsky at gmail.com>
AuthorDate: Sun Feb 5 18:01:38 2012 +0400
Commit:     Alexey Ozeritsky <aozeritsky at gmail.com>
CommitDate: Sun Feb 5 18:07:18 2012 +0400

    FindBLAS/FindLAPACK: 0012924 fixed, 0012925 fixed

diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 9b76d90..4efb6ec 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -23,6 +23,7 @@
 ##########
 ### List of vendors (BLA_VENDOR) valid in this module
 ##  Goto,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model),
+##  Intel10_64lp_seq (intel mkl v10 64 bit,sequential code, lp64 model),
 ##  Intel( older versions of mkl 32 and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic
 # C/CXX should be enabled to use Intel mkl
 
@@ -85,6 +86,7 @@ if (NOT _libdir)
     set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH)
   endif ()
 endif ()
+
 foreach(_library ${_list})
   set(_combined_name ${_combined_name}_${_library})
 
@@ -108,6 +110,7 @@ foreach(_library ${_list})
       NAMES ${_library}
       PATHS ${_libdir}
       )
+#    message(FATAL " -> found ${${_prefix}_${_library}_LIBRARY}")
     mark_as_advanced(${_prefix}_${_library}_LIBRARY)
     set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
     set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
@@ -115,7 +118,7 @@ foreach(_library ${_list})
 endforeach(_library ${_list})
 if(_libraries_work)
   # Test this combination of libraries.
-  set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_threads})
+  set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_thread})
 #  message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
   if (_CHECK_FORTRAN)
     check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS)
@@ -460,117 +463,99 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
   else(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
     find_package(Threads REQUIRED)
   endif(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
-  if (WIN32)
+
+  set(BLAS_SEARCH_LIBS "")
+
   if(BLA_F95)
-    if(NOT BLAS95_LIBRARIES)
-    check_fortran_libraries(
-    BLAS95_LIBRARIES
-    BLAS
-    sgemm
-    ""
-    "mkl_blas95;mkl_intel_c;mkl_intel_thread;mkl_core;libguide40"
-    ""
-    )
-    endif(NOT BLAS95_LIBRARIES)
-  else(BLA_F95)
-    if(NOT BLAS_LIBRARIES)
-    check_fortran_libraries(
-    BLAS_LIBRARIES
-    BLAS
-    SGEMM
-    ""
-    "mkl_c_dll;mkl_intel_thread_dll;mkl_core_dll;libguide40"
-    ""
-    )
-    endif(NOT BLAS_LIBRARIES)
-  endif(BLA_F95)
-  else(WIN32)
-  if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
-    if(BLA_F95)
-      if(NOT BLAS95_LIBRARIES)
-      check_fortran_libraries(
-      BLAS95_LIBRARIES
-      BLAS
-      sgemm
-      ""
-      "mkl_blas95;mkl_intel;mkl_intel_thread;mkl_core;guide"
-      "${CMAKE_THREAD_LIBS_INIT};${LM}"
-      )
-      endif(NOT BLAS95_LIBRARIES)
-    else(BLA_F95)
-    if(NOT BLAS_LIBRARIES)
-      check_fortran_libraries(
-      BLAS_LIBRARIES
-      BLAS
-      sgemm
-      ""
-      "mkl_intel;mkl_intel_thread;mkl_core;guide"
-      "${CMAKE_THREAD_LIBS_INIT}"
-      "${LM}"
-      )
-      endif(NOT BLAS_LIBRARIES)
-    endif(BLA_F95)
-  endif (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
-  if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
-   if(BLA_F95)
-    if(NOT BLAS95_LIBRARIES)
-      check_fortran_libraries(
-      BLAS95_LIBRARIES
-      BLAS
-      sgemm
-      ""
-      "mkl_blas95;mkl_intel_lp64;mkl_intel_thread;mkl_core;guide"
-      "${CMAKE_THREAD_LIBS_INIT};${LM}"
-      )
-    endif(NOT BLAS95_LIBRARIES)
-   else(BLA_F95)
-     if(NOT BLAS_LIBRARIES)
+    set(BLAS_mkl_SEARCH_SYMBOL SGEMM)
+    set(_LIBRARIES BLAS95_LIBRARIES)
+    if (WIN32)
+      list(APPEND BLAS_SEARCH_LIBS
+        "mkl_blas95 mkl_intel_c mkl_intel_thread mkl_core libguide40")
+    else (WIN32)
+      if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
+        list(APPEND BLAS_SEARCH_LIBS
+          "mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide")
+      endif ()
+      if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
+        # old version
+        list(APPEND BLAS_SEARCH_LIBS
+          "mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide")
+
+        # mkl >= 10.3
+        if (CMAKE_C_COMPILER MATCHES ".+gcc.*")
+          list(APPEND BLAS_SEARCH_LIBS
+            "mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core")
+          set(LM "${LM};-lgomp")
+        else ()
+          list(APPEND BLAS_SEARCH_LIBS
+            "mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
+        endif ()
+      endif ()
+    endif (WIN32)
+    if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
+      list(APPEND BLAS_SEARCH_LIBS
+        "mkl_blas95_lp64 mkl_intel_lp64 mkl_sequential mkl_core")
+    endif ()
+  else (BLA_F95)
+    set(BLAS_mkl_SEARCH_SYMBOL sgemm)
+    set(_LIBRARIES BLAS_LIBRARIES)
+    if (WIN32)
+      list(APPEND BLAS_SEARCH_LIBS
+        "mkl_c_dll mkl_intel_thread_dll mkl_core_dll libguide40")
+    else (WIN32)
+      if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
+        list(APPEND BLAS_SEARCH_LIBS
+          "mkl_intel mkl_intel_thread mkl_core guide")
+      endif ()
+      if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
+
+        # old version
+        list(APPEND BLAS_SEARCH_LIBS
+          "mkl_intel_lp64 mkl_intel_thread mkl_core guide")
+
+        # mkl >= 10.3
+        if (CMAKE_C_COMPILER MATCHES ".+gcc.*")
+          list(APPEND BLAS_SEARCH_LIBS
+            "mkl_intel_lp64 mkl_gnu_thread mkl_core")
+          set(LM "${LM};-lgomp")
+        else ()
+          list(APPEND BLAS_SEARCH_LIBS
+            "mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
+        endif ()
+      endif ()
+
+      #older vesions of intel mkl libs
+      if (BLA_VENDOR STREQUAL "Intel" OR BLA_VENDOR STREQUAL "All")
+        list(APPEND BLAS_SEARCH_LIBS
+          "mkl")
+        list(APPEND BLAS_SEARCH_LIBS
+          "mkl_ia32")
+        list(APPEND BLAS_SEARCH_LIBS
+          "mkl_em64t")
+      endif ()
+    endif (WIN32)
+    if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
+      list(APPEND BLAS_SEARCH_LIBS
+        "mkl_intel_lp64 mkl_sequential mkl_core")
+    endif ()
+  endif (BLA_F95)
+
+  foreach (SEARCH_LIBS ${BLAS_SEARCH_LIBS})
+    string(REPLACE " " ";" SEARCH_LIBS ${SEARCH_LIBS})
+    if (${${_LIBRARIES}})
+    else ()
       check_fortran_libraries(
-      BLAS_LIBRARIES
-      BLAS
-      sgemm
-      ""
-      "mkl_intel_lp64;mkl_intel_thread;mkl_core;guide"
-      "${CMAKE_THREAD_LIBS_INIT};${LM}"
-      )
-     endif(NOT BLAS_LIBRARIES)
-   endif(BLA_F95)
-  endif (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
-  endif (WIN32)
-  #older vesions of intel mkl libs
-  # BLAS in intel mkl library? (shared)
-  if(NOT BLAS_LIBRARIES)
-    check_fortran_libraries(
-    BLAS_LIBRARIES
-    BLAS
-    sgemm
-    ""
-    "mkl;guide"
-    "${CMAKE_THREAD_LIBS_INIT};${LM}"
-    )
-  endif(NOT BLAS_LIBRARIES)
-  #BLAS in intel mkl library? (static, 32bit)
-  if(NOT BLAS_LIBRARIES)
-    check_fortran_libraries(
-    BLAS_LIBRARIES
-    BLAS
-    sgemm
-    ""
-    "mkl_ia32;guide"
-    "${CMAKE_THREAD_LIBS_INIT};${LM}"
-    )
-  endif(NOT BLAS_LIBRARIES)
-  #BLAS in intel mkl library? (static, em64t 64bit)
-  if(NOT BLAS_LIBRARIES)
-    check_fortran_libraries(
-    BLAS_LIBRARIES
-    BLAS
-    sgemm
-    ""
-    "mkl_em64t;guide"
-    "${CMAKE_THREAD_LIBS_INIT};${LM}"
-    )
-  endif(NOT BLAS_LIBRARIES)
+        ${_LIBRARIES}
+        BLAS
+        ${BLAS_mkl_SEARCH_SYMBOL}
+        ""
+        "${SEARCH_LIBS}"
+        "${CMAKE_THREAD_LIBS_INIT};${LM}"
+        )
+    endif ()
+  endforeach ()
+
  endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
 endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
 
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 884266f..0ae98df 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -219,40 +219,69 @@ if (BLA_VENDOR STREQUAL "Generic" OR
   endif ( NOT LAPACK_LIBRARIES )
 endif ()
 #intel lapack
- if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
+if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
+  if (NOT WIN32)
+    set(LM "-lm")
+  endif ()
   if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
-   if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
+    if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
       find_PACKAGE(Threads)
-   else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
-       find_package(Threads REQUIRED)
-   endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
-   if (BLA_F95)
-    if(NOT LAPACK95_LIBRARIES)
-     check_lapack_libraries(
-     LAPACK95_LIBRARIES
-     LAPACK
-     cheev
-     ""
-     "mkl_lapack95"
-     "${BLAS95_LIBRARIES}"
-     "${CMAKE_THREAD_LIBS_INIT}"
-     )
-    endif(NOT LAPACK95_LIBRARIES)
-   else(BLA_F95)
-    if(NOT LAPACK_LIBRARIES)
-     check_lapack_libraries(
-     LAPACK_LIBRARIES
-     LAPACK
-     cheev
-     ""
-     "mkl_lapack"
-     "${BLAS_LIBRARIES}"
-     "${CMAKE_THREAD_LIBS_INIT}"
-     )
-    endif(NOT LAPACK_LIBRARIES)
-   endif(BLA_F95)
+    else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
+      find_package(Threads REQUIRED)
+    endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
+    if (BLA_F95)
+      if(NOT LAPACK95_LIBRARIES)
+        # old
+        check_lapack_libraries(
+          LAPACK95_LIBRARIES
+          LAPACK
+          cheev
+          ""
+          "mkl_lapack95"
+          "${BLAS95_LIBRARIES}"
+          "${CMAKE_THREAD_LIBS_INIT};${LM}"
+          )
+      endif(NOT LAPACK95_LIBRARIES)
+      if(NOT LAPACK95_LIBRARIES)
+        # new >= 10.3
+        check_lapack_libraries(
+          LAPACK95_LIBRARIES
+          LAPACK
+          CHEEV
+          ""
+          "mkl_intel_lp64"
+          "${BLAS95_LIBRARIES}"
+          "${CMAKE_THREAD_LIBS_INIT};${LM}"
+          )
+      endif(NOT LAPACK95_LIBRARIES)
+    else(BLA_F95)
+      if(NOT LAPACK_LIBRARIES)
+        # old
+        check_lapack_libraries(
+          LAPACK_LIBRARIES
+          LAPACK
+          cheev
+          ""
+          "mkl_lapack"
+          "${BLAS_LIBRARIES}"
+          "${CMAKE_THREAD_LIBS_INIT};${LM}"
+          )
+      endif(NOT LAPACK_LIBRARIES)
+      if(NOT LAPACK_LIBRARIES)
+        # new >= 10.3
+        check_lapack_libraries(
+          LAPACK_LIBRARIES
+          LAPACK
+          cheev
+          ""
+          "mkl_gf_lp64"
+          "${BLAS_LIBRARIES}"
+          "${CMAKE_THREAD_LIBS_INIT};${LM}"
+          )
+      endif(NOT LAPACK_LIBRARIES)
+    endif(BLA_F95)
   endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
- endif(BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
+endif(BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
 else(BLAS_FOUND)
   message(STATUS "LAPACK requires BLAS")
 endif(BLAS_FOUND)

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindBLAS.cmake   |  205 +++++++++++++++++++++-------------------------
 Modules/FindLAPACK.cmake |   91 ++++++++++++++-------
 2 files changed, 155 insertions(+), 141 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list