cmake_minimum_required(VERSION 2.8.3) project(test_lapack_blas) set(BLA_STATIC ON) find_package(BLAS) set(BLA_STATIC OFF) # Doesn't work if set to ON find_package(LAPACK) if (NOT BLAS_FOUND) message(FATAL_ERROR "System BLAS required but not found on the system. Install BLAS libraries and restart cmake configuration.") endif () if (NOT LAPACK_FOUND) message(FATAL_ERROR "System LAPACK required but not found on the system. Install LAPACK libraries and restart cmake configuration.") endif ()