Skip to content

Commit

Permalink
add ATLAS-CLAPACK to linker, when using original LAPACK
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Esser committed Sep 17, 2013
1 parent 8abbf8b commit dcd59e9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Expand Up @@ -481,7 +481,15 @@ IF (LAPACK_FOUND)
LIST(APPEND DEFINES HAVE_LAPACK HAVE_ATLAS)
LIST(APPEND INCLUDES ${ATLAS_INCLUDES})
IF(USE_ORIGINAL_LAPACK)
SET(POSTLINKFLAGS ${POSTLINKFLAGS} ${LAPACK_LIBRARIES} ${ATLAS_LIBRARIES})
SET(ATLAS_CLAPACK_LIBRARY)
FOREACH(ITR ${ATLAS_LIBRARIES})
IF(ITR MATCHES ".*atlas.*lapack.*" OR ITR MATCHES ".*lapack.*atlas.*")
STRING(REGEX REPLACE "lapack" "clapack" ITR ${ITR})
LIST(APPEND ATLAS_CLAPACK_LIBRARY ${ITR})
ENDIF(ITR MATCHES ".*atlas.*lapack.*" OR ITR MATCHES ".*lapack.*atlas.*")
ENDFOREACH(ITR ${ATLAS_LIBRARIES})
MESSAGE(STATUS "using ATLAS-CLAPACK from: ${ATLAS_CLAPACK_LIBRARY}")
SET(POSTLINKFLAGS ${POSTLINKFLAGS} ${LAPACK_LIBRARIES} ${ATLAS_CLAPACK_LIBRARY} ${ATLAS_LIBRARIES})
ELSE(USE_ORIGINAL_LAPACK)
SET(POSTLINKFLAGS ${POSTLINKFLAGS} ${ATLAS_LIBRARIES})
ENDIF(USE_ORIGINAL_LAPACK)
Expand Down

0 comments on commit dcd59e9

Please sign in to comment.