ENH: checks if Fortran is enbaled. If not an error message is produced.
This commit is contained in:
parent
ff63bb1b44
commit
834dd533ed
@ -1,4 +1,5 @@
|
|||||||
# - Find BLAS library
|
# - Find a Fortran BLAS library
|
||||||
|
# N.B. Fortran only. This module cannot be used to find a C BLAS library.
|
||||||
# This module finds an installed fortran library that implements the BLAS
|
# This module finds an installed fortran library that implements the BLAS
|
||||||
# linear-algebra interface (see http://www.netlib.org/blas/).
|
# linear-algebra interface (see http://www.netlib.org/blas/).
|
||||||
# The list of libraries searched for is taken
|
# The list of libraries searched for is taken
|
||||||
@ -15,6 +16,11 @@
|
|||||||
# BLAS95_LIBRARIES - uncached list of libraries (using full path name) # to link against to use BLAS95 interface
|
# BLAS95_LIBRARIES - uncached list of libraries (using full path name) # to link against to use BLAS95 interface
|
||||||
#
|
#
|
||||||
|
|
||||||
|
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||||
|
if(NOT _LANGUAGES_ MATCHES Fortran)
|
||||||
|
message(FATAL_ERROR "FindBLAS is Fortran-only so Fortran must be enabled.")
|
||||||
|
endif(NOT _LANGUAGES_ MATCHES Fortran)
|
||||||
|
|
||||||
include(CheckFortranFunctionExists)
|
include(CheckFortranFunctionExists)
|
||||||
|
|
||||||
macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list)
|
macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list)
|
||||||
@ -65,10 +71,7 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list)
|
|||||||
# Test this combination of libraries.
|
# Test this combination of libraries.
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}})
|
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}})
|
||||||
#message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
|
#message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
|
||||||
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
|
check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
|
||||||
if(_LANGUAGES_ MATCHES Fortran)
|
|
||||||
check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
|
|
||||||
endif(_LANGUAGES_ MATCHES Fortran)
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES)
|
set(CMAKE_REQUIRED_LIBRARIES)
|
||||||
mark_as_advanced(${_prefix}${_combined_name}_WORKS)
|
mark_as_advanced(${_prefix}${_combined_name}_WORKS)
|
||||||
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
|
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# - Find LAPACK library
|
# - Find a Fortran LAPACK library
|
||||||
|
# N.B. Fortran only. This module cannot be used to find a C LAPACK library.
|
||||||
# This module finds an installed fortran library that implements the LAPACK
|
# This module finds an installed fortran library that implements the LAPACK
|
||||||
# linear-algebra interface (see http://www.netlib.org/lapack/).
|
# linear-algebra interface (see http://www.netlib.org/lapack/).
|
||||||
#
|
#
|
||||||
@ -17,6 +18,11 @@
|
|||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||||
|
if(NOT _LANGUAGES_ MATCHES Fortran)
|
||||||
|
message(FATAL_ERROR "FindLAPACK is Fortran-only so Fortran must be enabled.")
|
||||||
|
endif(NOT _LANGUAGES_ MATCHES Fortran)
|
||||||
|
|
||||||
include(CheckFortranFunctionExists)
|
include(CheckFortranFunctionExists)
|
||||||
set(LAPACK_FOUND FALSE)
|
set(LAPACK_FOUND FALSE)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user