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
This commit is contained in:
Alin Elena 2008-07-21 04:56:26 -04:00
parent c52f9425c7
commit dbb89f47aa
2 changed files with 7 additions and 4 deletions

View File

@ -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
"
)

View File

@ -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)