Skip to content

Commit

Permalink
added build option to use packaged lapack
Browse files Browse the repository at this point in the history
  • Loading branch information
peterspackman committed Sep 14, 2016
1 parent a0a969d commit 0c3f021
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,18 @@ configure_file(
include_directories(${PROJECT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})

# BLAS/LAPACK dependency
# For windows install from here https://sourceforge.net/p/msys2/wiki/Contributing%20to%20MSYS2/
#if(WIN32)
# message(STATUS "Not going to look for lapack on WINDOWS, using packaged source")
# add_library(lapack STATIC ${CMAKE_CURRENT_SOURCE_DIR}/lapack/blas.F90 ${CMAKE_SOURCE_DIR}/lapack/lapack.F90 ${MACROS})
# set(LAPACK_LIBRARIES lapack)
#else()
if(NOT USE_PACKAGED_LAPACK)
find_package(LAPACK)
if(NOT ${LAPACK_FOUND})
message(STATUS "No lapack found, using packaged libs")
add_library(lapack STATIC ${CMAKE_CURRENT_SOURCE_DIR}/lapack/blas.F90 ${CMAKE_CURRENT_SOURCE_DIR}/lapack/lapack.F90 ${MACROS})
set(LAPACK_LIBRARIES lapack)
endif()
#endif()
else()
message(STATUS "Using packaged libs")
add_library(lapack STATIC ${CMAKE_CURRENT_SOURCE_DIR}/lapack/blas.F90 ${CMAKE_CURRENT_SOURCE_DIR}/lapack/lapack.F90 ${MACROS})
set(LAPACK_LIBRARIES lapack)
endif()

# Foo source files
set(FOO_DIR ${CMAKE_CURRENT_SOURCE_DIR}/foofiles)
Expand Down

0 comments on commit 0c3f021

Please sign in to comment.