summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlexey Ozeritsky <aozeritsky@gmail.com>2010-12-27 08:37:46 (GMT)
committerAlexey Ozeritsky <aozeritsky@gmail.com>2010-12-27 08:37:46 (GMT)
commite64b5daeced6ed29cc9fce252a137a097972b9ce (patch)
treed941c012cec15b0dd2dcf57a1b59e1cc28c851a8 /Modules
parent1279bd7bac7c9970ae1ea76744d05299232e4b04 (diff)
downloadCMake-e64b5daeced6ed29cc9fce252a137a097972b9ce.zip
CMake-e64b5daeced6ed29cc9fce252a137a097972b9ce.tar.gz
CMake-e64b5daeced6ed29cc9fce252a137a097972b9ce.tar.bz2
fix for Fortran-only projects
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBLAS.cmake10
1 files changed, 9 insertions, 1 deletions
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})