From 1279bd7bac7c9970ae1ea76744d05299232e4b04 Mon Sep 17 00:00:00 2001 From: Alexey Ozeritsky Date: Mon, 27 Dec 2010 11:14:13 +0300 Subject: find ACML fixes --- Modules/FindLAPACK.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 40effb0..f7b7ab5 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -157,11 +157,21 @@ if(BLAS_FOUND) LAPACK cheev "" - "acml" + "acml;acml_mv" "" "" ) endif(NOT LAPACK_LIBRARIES) + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "acml_mp;acml_mv" + "" + ) + endif(NOT LAPACK_LIBRARIES) endif (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All") # Apple LAPACK library? -- cgit v0.12 From e64b5daeced6ed29cc9fce252a137a097972b9ce Mon Sep 17 00:00:00 2001 From: Alexey Ozeritsky Date: Mon, 27 Dec 2010 11:37:46 +0300 Subject: fix for Fortran-only projects --- Modules/FindBLAS.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index b605164..d57513c 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -40,7 +40,11 @@ # License text for the above reference.) get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES) +if (NOT _LANGUAGES_ MATCHES Fortran) include(CheckFunctionExists) +else () +include(CheckFortranFunctionExists) +endif() macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _threads) # This macro checks for the existence of the combination of fortran libraries @@ -98,7 +102,11 @@ if(_libraries_work) # Test this combination of libraries. set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_threads}) # message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") - check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) + if (_LANGUAGES_ MATCHES Fortran) + check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS) + else() + check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) + endif() set(CMAKE_REQUIRED_LIBRARIES) mark_as_advanced(${_prefix}${_combined_name}_WORKS) set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) -- cgit v0.12 From 51253da8bb193cdac4ac45ac43b250cecc2c0e87 Mon Sep 17 00:00:00 2001 From: Alexey Ozeritsky Date: Mon, 27 Dec 2010 11:42:41 +0300 Subject: FindLAPACK works with C/C++ only projects (issue 0009976) --- Modules/FindLAPACK.cmake | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index f7b7ab5..bf45406 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -37,17 +37,12 @@ # License text for the above reference.) get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES) -if(NOT _LANGUAGES_ MATCHES Fortran) - if(LAPACK_FIND_REQUIRED) - message(FATAL_ERROR - "FindLAPACK is Fortran-only so Fortran must be enabled.") - else(LAPACK_FIND_REQUIRED) - message(STATUS "Looking for LAPACK... - NOT found (Fortran not enabled)") - return() - endif(LAPACK_FIND_REQUIRED) -endif(NOT _LANGUAGES_ MATCHES Fortran) - +if (NOT _LANGUAGES_ MATCHES Fortran) +include(CheckFunctionExists) +else (NOT _LANGUAGES_ MATCHES Fortran) include(CheckFortranFunctionExists) +endif (NOT _LANGUAGES_ MATCHES Fortran) + set(LAPACK_FOUND FALSE) set(LAPACK95_FOUND FALSE) @@ -112,7 +107,11 @@ if(_libraries_work) set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads}) endif(UNIX AND BLA_STATIC) # message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") - check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) + if (NOT _LANGUAGES_ MATCHES Fortran) + check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) + else (NOT _LANGUAGES_ MATCHES Fortran) + check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) + endif (NOT _LANGUAGES_ MATCHES Fortran) set(CMAKE_REQUIRED_LIBRARIES) mark_as_advanced(${_prefix}${_combined_name}_WORKS) set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) @@ -170,6 +169,7 @@ if(BLAS_FOUND) "" "acml_mp;acml_mv" "" + "" ) endif(NOT LAPACK_LIBRARIES) endif (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All") -- cgit v0.12