[Cmake-commits] CMake branch, next, updated. v2.8.4-1060-gbfae221

Alexey Ozeritsky aozeritsky at gmail.com
Wed Mar 2 02:56:19 EST 2011


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  bfae221b7c968c553209b357922f0e6fa624b694 (commit)
       via  f6f619852c1fa3813c7b3560f74f957d82e157e6 (commit)
       via  f72cc88c659d586cc65ac47e7807054345ccad89 (commit)
      from  deb32dc44be2d3f918aad43c9189e8d87f9bba75 (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=bfae221b7c968c553209b357922f0e6fa624b694
commit bfae221b7c968c553209b357922f0e6fa624b694
Merge: deb32dc f6f6198
Author:     Alexey Ozeritsky <aozeritsky at gmail.com>
AuthorDate: Wed Mar 2 02:56:13 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 2 02:56:13 2011 -0500

    Merge topic 'FindBLAS' into next
    
    f6f6198 ACML search improvement
    f72cc88 KWSys Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6f619852c1fa3813c7b3560f74f957d82e157e6
commit f6f619852c1fa3813c7b3560f74f957d82e157e6
Author:     Alexey Ozeritsky <aozeritsky at gmail.com>
AuthorDate: Wed Mar 2 10:55:28 2011 +0300
Commit:     Alexey Ozeritsky <aozeritsky at gmail.com>
CommitDate: Wed Mar 2 10:55:28 2011 +0300

    ACML search improvement

diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index d57513c..ae4a13f 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -23,7 +23,7 @@
 ##########
 ### List of vendors (BLA_VENDOR) valid in this module
 ##  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),
-##  Intel( older versions of mkl 32 and 64 bit), ACML,Apple, NAS, Generic
+##  Intel( older versions of mkl 32 and 64 bit), ACML,ACML_MP,Apple, NAS, Generic
 # C/CXX should be enabled to use Intel mkl
 
 #=============================================================================
@@ -39,12 +39,23 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
-if (NOT _LANGUAGES_ MATCHES Fortran)
 include(CheckFunctionExists)
-else ()
 include(CheckFortranFunctionExists)
-endif()
+
+# Check the language being used
+get_property( _LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES )
+if( _LANGUAGES_ MATCHES Fortran )
+  set( _CHECK_FORTRAN TRUE )
+elseif( (_LANGUAGES_ MATCHES C) OR (_LANGUAGES_ MATCHES CXX) )
+  set( _CHECK_FORTRAN FALSE )
+else()
+  if(BLAS_FIND_REQUIRED)
+    message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.")
+  else(BLAS_FIND_REQUIRED)
+    message(STATUS "Looking for BLAS... - NOT found (Unsupported languages)")
+    return()
+  endif(BLAS_FIND_REQUIRED)
+endif( )
 
 macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _threads)
 # This macro checks for the existence of the combination of fortran libraries
@@ -102,7 +113,7 @@ if(_libraries_work)
   # Test this combination of libraries.
   set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_threads})
 #  message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
-  if (_LANGUAGES_ MATCHES Fortran)
+  if (_CHECK_FORTRAN)
     check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS)
   else()
     check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
@@ -244,7 +255,76 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
 endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
 
 #BLAS in acml library?
-if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All")
+if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "ACML_MP" OR BLA_VENDOR STREQUAL "All")
+# the patch from Chuck Atkins:
+ if( ((_BLAS_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR
+    ((_BLAS_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) )
+   if( WIN32 )
+    file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" )
+   else()
+    file( GLOB _ACML_ROOT "/opt/acml*/ACML-EULA.txt" )
+   endif()
+   if( _ACML_ROOT )
+    get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH )
+    if( SIZEOF_INTEGER EQUAL 8 )
+     set( _ACML_PATH_SUFFIX "_int64" )
+    else()
+    set( _ACML_PATH_SUFFIX "" )
+   endif()
+   if( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" )
+    set( _ACML_COMPILER32 "ifort32" )
+    set( _ACML_COMPILER64 "ifort64" )
+   elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro" )
+    set( _ACML_COMPILER32 "sun32" )
+    set( _ACML_COMPILER64 "sun64" )
+   elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "PGI" )
+    set( _ACML_COMPILER32 "pgi32" )
+    if( WIN32 )
+     set( _ACML_COMPILER64 "win64" )
+    else()
+     set( _ACML_COMPILER64 "pgi64" )
+    endif()
+   elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "Open64" )
+    # 32 bit builds not supported on Open64 but for code simplicity
+    # We'll just use the same directory twice
+    set( _ACML_COMPILER32 "open64_64" )
+    set( _ACML_COMPILER64 "open64_64" )
+   elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" )
+    set( _ACML_COMPILER32 "nag32" )
+    set( _ACML_COMPILER64 "nag64" )
+   else() #if( CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
+    set( _ACML_COMPILER32 "gfortran32" )
+    set( _ACML_COMPILER64 "gfortran64" )
+   endif()
+
+   if( _BLAS_VENDOR STREQUAL "ACML_MP" )
+    set(_ACML_MP_LIB_DIRS
+     "${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib"
+     "${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" )
+   else() #if( _BLAS_VENDOR STREQUAL "ACML" )
+    set(_ACML_LIB_DIRS
+     "${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib"
+     "${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" )
+   endif()
+  endif()
+ endif()
+
+ if( _BLAS_VENDOR STREQUAL "ACML_MP" )
+  foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS} )
+   _BLAS_LOCATE_AND_TEST( ${_BLAS_VENDOR} "acml_mp;acml_mv" "" )
+   if( BLAS_${_BLAS_VENDOR}_FOUND )
+    break()
+   endif()
+  endforeach()
+ else() #if( _BLAS_VENDOR STREQUAL "ACML" )
+  foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} )
+   _BLAS_LOCATE_AND_TEST( ${_BLAS_VENDOR} "acml;acml_mv" "" )
+   if( BLAS_${_BLAS_VENDOR}_FOUND )
+    break()
+   endif()
+  endforeach()
+ endif()
+
  # Either acml or acml_mp should be in LD_LIBRARY_PATH but not both
  if(NOT BLAS_LIBRARIES)
   check_fortran_libraries(
@@ -266,7 +346,7 @@ if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All")
   ""
   )
  endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All")
+endif () # ACML
 
 # Apple BLAS library?
 if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")

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

Summary of changes:
 Modules/FindBLAS.cmake            |   96 +++++++++++++++++++++++++++++++++---
 Source/kwsys/kwsysDateStamp.cmake |    2 +-
 2 files changed, 89 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list