summaryrefslogtreecommitdiffstats
path: root/Modules/FindBLAS.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-06-17 17:27:19 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-06-17 17:27:19 (GMT)
commitebe5eba1a08b5841188ab7fba875dd69fc58290e (patch)
treeabb355e2a8d58411b85af71af50299d9b0332827 /Modules/FindBLAS.cmake
parent5b5cd07d8de6bc5f59aa02da4076b1e5df4a9cb2 (diff)
downloadCMake-ebe5eba1a08b5841188ab7fba875dd69fc58290e.zip
CMake-ebe5eba1a08b5841188ab7fba875dd69fc58290e.tar.gz
CMake-ebe5eba1a08b5841188ab7fba875dd69fc58290e.tar.bz2
ENH: make find blas work if there is no fortran compiler
Diffstat (limited to 'Modules/FindBLAS.cmake')
-rw-r--r--Modules/FindBLAS.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 72f2dee..58d0967 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -65,7 +65,10 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list)
# Test this combination of libraries.
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}})
#message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
- check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
+ get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
+ if(_LANGUAGES_ MATCHES Fortran)
+ check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
+ endif(_LANGUAGES_ MATCHES Fortran)
set(CMAKE_REQUIRED_LIBRARIES)
mark_as_advanced(${_prefix}${_combined_name}_WORKS)
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})