Skip to content

Commit

Permalink
Update: Set CXX flag according to MAGMA documentation (single undersc…
Browse files Browse the repository at this point in the history
…ore, uppecase, no change) using F77_BLAS_MANGLE detected from Trilinos
  • Loading branch information
vqd8a committed May 13, 2019
1 parent 40eb122 commit ed00458
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,12 @@ IF (KOKKOSKERNELS_ENABLE_TPL_MAGMA)
LIST(APPEND TPL_LIST "MAGMA")
IF (F77_BLAS_MANGLE STREQUAL "(name,NAME) name ## _")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADD_ -fopenmp -lgfortran")
ELSEIF (F77_BLAS_MANGLE STREQUAL "(name,NAME) name ## __")
MESSAGE(FATAL_ERROR "MAGMA does not prefer Fortran mangling with double underscore")
ELSE ()
ELSEIF (F77_BLAS_MANGLE STREQUAL "(name,NAME) NAME")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUPCASE -fopenmp -lgfortran")
ELSEIF (F77_BLAS_MANGLE STREQUAL "(name,NAME) name")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOCHANGE -fopenmp -lgfortran")
ELSE ()
MESSAGE(FATAL_ERROR "F77_BLAS_MANGLE ${F77_BLAS_MANGLE} detected while MAGMA only accepts Fortran mangling that is one of single underscore (-DADD_), uppercase (-DUPCASE), and no change (-DNOCHANGE)")
ENDIF()
ENDIF()

Expand Down

0 comments on commit ed00458

Please sign in to comment.