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

cmake/Modules: Allow user to use MAGMA_DIR from env #1007

Merged
merged 2 commits into from
Jun 3, 2021
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
13 changes: 11 additions & 2 deletions cmake/Modules/FindTPLMAGMA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ ELSEIF (MAGMA_LIBRARIES)
KOKKOSKERNELS_FIND_IMPORTED(MAGMA INTERFACE LIBRARIES ${MAGMA_LIBRARIES})
ELSEIF (MAGMA_LIBRARY_DIRS)
KOKKOSKERNELS_FIND_IMPORTED(MAGMA INTERFACE LIBRARIES amath ${MAGMA_LIB} LIBRARY_PATHS ${MAGMA_LIBRARY_DIRS})
ELSEIF (KokkosKernels_MAGMA_ROOT)
SET(MAGMA_ROOT ${KokkosKernels_MAGMA_ROOT})
ELSEIF (KokkosKernels_MAGMA_ROOT OR DEFINED ENV{MAGMA_DIR})
IF (KokkosKernels_MAGMA_ROOT AND DEFINED ENV{MAGMA_DIR})
MESSAGE(FATAL_ERROR "Both KokkosKernels_MAGMA_ROOT and ENV{MAGMA_DIR} are defined!")
ENDIF()

IF (KokkosKernels_MAGMA_ROOT)
SET(MAGMA_ROOT ${KokkosKernels_MAGMA_ROOT})
ELSE()
SET(MAGMA_ROOT $ENV{MAGMA_DIR})
ENDIF()

KOKKOSKERNELS_FIND_IMPORTED(MAGMA INTERFACE
LIBRARIES
magma
Expand Down