diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d09034c24b9f7a27397c9e23ad5a7e90a70bae7..fdcd443e09423452246d517baaca8961403809ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,18 +114,16 @@ include(CheckSystem) # SPM depends on Lapacke and CBLAS #--------------------------------- -find_package(LAPACKE REQUIRED) -if(LAPACKE_FOUND) - message(STATUS "lapacke: ${LAPACKE_INCLUDE_DIRS}") - include_directories(${LAPACKE_INCLUDE_DIRS}) -endif() - -find_package(CBLAS REQUIRED) +find_package(CBLAS) # Should be REQUIRED for BLAS sequential only if(CBLAS_FOUND) - message(STATUS "cblas: ${CBLAS_INCLUDE_DIRS}") include_directories(${CBLAS_INCLUDE_DIRS}) endif() +find_package(LAPACKE) # Should be also REQUIRED +if(LAPACKE_FOUND) + include_directories(${LAPACKE_INCLUDE_DIRS}) +endif() + ### Store dependencies not handled with pkg-config set( DEPS_LIBRARIES ${LAPACKE_LIBRARIES_DEP}