From dbb89f47aa2bcffe023fc1f2e23cb5466c331b17 Mon Sep 17 00:00:00 2001 From: Alin Elena Date: Mon, 21 Jul 2008 04:56:26 -0400 Subject: ENH: Modules/CheckFortranFunctionExists.cmake helps gfortran to check the existence of a file ENH: Modules/FindLAPACK.cmake returns the full list of libraries required to link against Lapack --- Modules/CheckFortranFunctionExists.cmake | 2 +- Modules/FindLAPACK.cmake | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake index 4106a06..3ff5853 100644 --- a/Modules/CheckFortranFunctionExists.cmake +++ b/Modules/CheckFortranFunctionExists.cmake @@ -8,7 +8,6 @@ # modify the way the check is run: # # CMAKE_REQUIRED_LIBRARIES = list of libraries to link -# macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) if(NOT DEFINED ${VARIABLE}) @@ -24,6 +23,7 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) " program TESTFortran external ${FUNCTION} + call ${FUNCTION}() end " ) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index bb09b3b..693287d 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -75,9 +75,12 @@ if(_libraries_work) #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") endif(_libraries_work) -if(NOT _libraries_work) - set(${LIBRARIES} FALSE) -endif(NOT _libraries_work) + + if(_libraries_work) + set(${LIBRARIES} ${${LIBRARIES}} ${_blas}) + else(_libraries_work) + set(${LIBRARIES} FALSE) + endif(_libraries_work) endmacro(Check_Lapack_Libraries) -- cgit v0.12