Skip to content

Commit

Permalink
disable LAPACK if not found (LAPACK is optional)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Mar 29, 2018
1 parent 3ded079 commit d323a08
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Expand Up @@ -24,17 +24,23 @@ if(ENABLE_COMPILE)
find_package(GSL REQUIRED)

if(ENABLE_LAPACK)
find_package(LAPACK REQUIRED)
find_package(LAPACK)
if(LAPACK_FOUND)
message(STATUS "Enabling use of the LAPACK library")
else()
unset(ENABLE_LAPACK)
message(STATUS "Disabling use of the LAPACK library")
endif()
endif()

if(ENABLE_THREADS)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
if(THREADS_FOUND)
message(STATUS "Enabling multi-threading")
message(STATUS "Enabling use of multi-threading")
else()
unset(ENABLE_THREADS)
message(STATUS "Disabling multi-threading")
message(STATUS "Disabling use of multi-threading")
endif()
endif()
endif()
Expand Down

0 comments on commit d323a08

Please sign in to comment.