Chris@49: # - Find the MKL libraries (no includes) Chris@49: # This module defines Chris@49: # MKL_LIBRARIES, the libraries needed to use Intel's implementation of BLAS & LAPACK. Chris@49: # MKL_FOUND, If false, do not try to use MKL. Chris@49: Chris@49: SET(MKL_NAMES ${MKL_NAMES} mkl_lapack) Chris@49: SET(MKL_NAMES ${MKL_NAMES} mkl_intel_thread) Chris@49: SET(MKL_NAMES ${MKL_NAMES} mkl_core) Chris@49: SET(MKL_NAMES ${MKL_NAMES} guide) Chris@49: SET(MKL_NAMES ${MKL_NAMES} mkl) Chris@49: SET(MKL_NAMES ${MKL_NAMES} iomp5) Chris@49: #SET(MKL_NAMES ${MKL_NAMES} pthread) Chris@49: Chris@49: IF(CMAKE_SIZEOF_VOID_P EQUAL 8) Chris@49: SET(MKL_NAMES ${MKL_NAMES} mkl_intel_lp64) Chris@49: ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8) Chris@49: SET(MKL_NAMES ${MKL_NAMES} mkl_intel) Chris@49: ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8) Chris@49: Chris@49: FOREACH (MKL_NAME ${MKL_NAMES}) Chris@49: FIND_LIBRARY(${MKL_NAME}_LIBRARY Chris@49: NAMES ${MKL_NAME} Chris@49: PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/intel/lib/intel64 /opt/intel/lib/ia32 /opt/intel/mkl/lib/lib64 /opt/intel/mkl/lib/intel64 /opt/intel/mkl/lib/ia32 /opt/intel/mkl/lib /opt/intel/*/mkl/lib/intel64 /opt/intel/*/mkl/lib/ia32/ /opt/mkl/*/lib/em64t /opt/mkl/*/lib/32 /opt/intel/mkl/*/lib/em64t /opt/intel/mkl/*/lib/32 Chris@49: ) Chris@49: Chris@49: SET(TMP_LIBRARY ${${MKL_NAME}_LIBRARY}) Chris@49: Chris@49: IF(TMP_LIBRARY) Chris@49: SET(MKL_LIBRARIES ${MKL_LIBRARIES} ${TMP_LIBRARY}) Chris@49: ENDIF(TMP_LIBRARY) Chris@49: ENDFOREACH(MKL_NAME) Chris@49: Chris@49: IF (MKL_LIBRARIES) Chris@49: SET(MKL_FOUND "YES") Chris@49: ELSE (MKL_LIBRARIES) Chris@49: SET(MKL_FOUND "NO") Chris@49: ENDIF (MKL_LIBRARIES) Chris@49: Chris@49: IF (MKL_FOUND) Chris@49: IF (NOT MKL_FIND_QUIETLY) Chris@49: MESSAGE(STATUS "Found MKL libraries: ${MKL_LIBRARIES}") Chris@49: ENDIF (NOT MKL_FIND_QUIETLY) Chris@49: ELSE (MKL_FOUND) Chris@49: IF (MKL_FIND_REQUIRED) Chris@49: MESSAGE(FATAL_ERROR "Could not find MKL libraries") Chris@49: ENDIF (MKL_FIND_REQUIRED) Chris@49: ENDIF (MKL_FOUND) Chris@49: Chris@49: # MARK_AS_ADVANCED(MKL_LIBRARY)