Skip to content

Commit

Permalink
Merge pull request #1007 from e10harvey/allow_spot_checks_with_magma
Browse files Browse the repository at this point in the history
cmake/Modules: Allow user to use MAGMA_DIR from env
  • Loading branch information
e10harvey authored Jun 3, 2021
2 parents b18f176 + 600c8ed commit ff759d7
Showing 1 changed file with 11 additions and 2 deletions.
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

0 comments on commit ff759d7

Please sign in to comment.