diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index c78d627812..97af3ef7cc 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -21,7 +21,8 @@ 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)") + message(STATUS "Looking for BLAS... - NOT found (Fortran not enabled)") # + return() endif(BLAS_FIND_REQUIRED) endif(NOT _LANGUAGES_ MATCHES Fortran) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 6fa0e0fc41..e78a0b9175 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -24,7 +24,8 @@ if(NOT _LANGUAGES_ MATCHES Fortran) 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)") + message(STATUS "Looking for LAPACK... - NOT found (Fortran not enabled)") + return() endif(LAPACK_FIND_REQUIRED) endif(NOT _LANGUAGES_ MATCHES Fortran)