ENH: this should fail only if required is sent to find package

This commit is contained in:
Bill Hoffman 2008-07-21 15:11:03 -04:00
parent 834dd533ed
commit e1a2c08628
2 changed files with 215 additions and 206 deletions

View File

@ -18,7 +18,11 @@
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
if(NOT _LANGUAGES_ MATCHES Fortran)
if(BLAS_FIND_REQUIRED)
message(FATAL_ERROR "FindBLAS is Fortran-only so Fortran must be enabled.")
else(BLAS_FIND_REQUIRED)
MESSAGE(STATUS "Looking for BLAS... - NOT found (Fortran not enabled)")
endif(BLAS_FIND_REQUIRED)
endif(NOT _LANGUAGES_ MATCHES Fortran)
include(CheckFortranFunctionExists)

View File

@ -20,7 +20,12 @@
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
if(NOT _LANGUAGES_ MATCHES Fortran)
message(FATAL_ERROR "FindLAPACK is Fortran-only so Fortran must be enabled.")
if(LAPACK_FIND_REQUIRED)
message(FATAL_ERROR
"FindLAPACK is Fortran-only so Fortran must be enabled.")
else(LAPACK_FIND_REQUIRED)
MESSAGE(STATUS "Looking for LAPACK... - NOT found (Fortran not enabled)")
endif(LAPACK_FIND_REQUIRED)
endif(NOT _LANGUAGES_ MATCHES Fortran)
include(CheckFortranFunctionExists)