Skip to content
Snippets Groups Projects
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
Branches
No related tags found
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment