Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail at build time if magma asked for but not found #643

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -325,28 +325,27 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")


if(BML_MAGMA)
FIND_PACKAGE(MAGMA)
endif()

if (MAGMA_FOUND)
add_definitions(-DBML_USE_MAGMA)
message(STATUS
"MAGMA was found:\n"
" MAGMA_INCLUDE_DIRS: ${MAGMA_INCLUDE_DIRS}\n"
" MAGMA_LIBRARY_DIRS: ${MAGMA_LIBRARY_DIRS}\n"
" MAGMA_LIBRARIES: ${MAGMA_LIBRARIES}"
)
include_directories(${MAGMA_INCLUDE_DIRS})
if(BML_CUSOLVER)
add_definitions(-DBML_USE_CUSOLVER)
endif()
if(BML_ROCSOLVER)
add_definitions(-DBML_USE_ROCSOLVER)
message(STATUS "Search for MAGMA...")
find_package(MAGMA)

if (MAGMA_FOUND)
add_definitions(-DBML_USE_MAGMA)
message(STATUS
"MAGMA was found:\n"
" MAGMA_INCLUDE_DIRS: ${MAGMA_INCLUDE_DIRS}\n"
" MAGMA_LIBRARY_DIRS: ${MAGMA_LIBRARY_DIRS}\n"
" MAGMA_LIBRARIES: ${MAGMA_LIBRARIES}"
)
include_directories(${MAGMA_INCLUDE_DIRS})
if(BML_CUSOLVER)
add_definitions(-DBML_USE_CUSOLVER)
endif()
if(BML_ROCSOLVER)
add_definitions(-DBML_USE_ROCSOLVER)
endif()
else()
message(FATAL_ERROR "MAGMA was not found")
endif()
else()
message(STATUS
"MAGMA not found"
)
endif()

set(BML_SCALAPACK FALSE CACHE BOOL "Whether to use ScaLAPACK library")
Expand Down