Commit df003950 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Better LAPACK finder and MPI search in CMake

update those interfaces
parent 84beb0ce
......@@ -86,28 +86,18 @@ include_directories(${Boost_INCLUDE_DIRS})
mark_as_advanced(PYTHON_INCLUDE_PATH Boost_LIBS)
# Check BLAS/LAPACK
find_package(MKL REQUIRED)
if(MKL_FOUND)
include_directories(${MKL_INCLUDE_DIRS})
set(LAPACK_LIBRARIES ${MKL_LIBRARIES})
else()
find_package(LAPACK)
if(LPACK_FOUND)
set(LAPACK_LIBRARIES ${LAPACK_LIBRARIES})
else()
message(FATAL_ERROR "LAPACK/BLAS not found")
endif()
target_link_libraries(mytest ${BLAS_LIBRARIES})
set(BLA_VENDOR Intel10_64lp_seq)
find_package(LAPACK)
if(NOT LAPACK_FOUND)
set(BLA_VENDOR All)
find_package(LAPACK REQUIRED)
endif()
message(STATUS "LAPACK_LIBRARIES = ${LAPACK_LIBRARIES}")
# Check MPI
find_package(MPI)
if(MPI_CXX_FOUND)
include_directories(MPI_CXX_INCLUDE_DIRS)
set(MPI_LIBRARIES, MPI_CXX_LIBRARIES)
else()
message(FATAL_ERROR "MPI not found.")
endif()
find_package(MPI REQUIRED)
include_directories(MPI_CXX_INCLUDE_DIRS)
set(MPI_LIBRARIES, MPI_CXX_LIBRARIES)
include_directories(${CMAKE_CURRENT_LIST_DIR}/src)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/src)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment