This commit is contained in:
Radovan Bast 2015-08-28 21:07:28 +02:00
parent ca60aa3faf
commit cf570c3c5a

View File

@ -483,7 +483,7 @@ foreach(_service BLAS LAPACK)
set(${_service}_FOUND ${${_service}_FOUND} CACHE BOOL "${_service} found")
endforeach()
#miro: first lapack, then blas as lapack might need blas routine
# first lapack, then blas as lapack might need blas routine
set(MATH_LIBS
${MATH_LIBS}
${LAPACK_LIBRARIES}
@ -491,15 +491,15 @@ set(MATH_LIBS
CACHE STRING "Math libraries"
)
#miro: further adaptation for the static linking
# further adaptation for the static linking
if (ENABLE_STATIC_LINKING)
if (LAPACK_TYPE MATCHES ATLAS OR LAPACK_TYPE MATCHES SYSTEM_NATIVE OR BLAS_TYPE MATCHES ATLAS OR BLAS_TYPE MATCHES SYSTEM_NATIVE)
#miro: TODO: some compilers might need -lgfortran
set (MATH_LIBS ${MATH_LIBS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive)
set(MATH_LIBS ${MATH_LIBS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive)
endif()
if (LAPACK_TYPE MATCHES MKL OR BLAS_TYPE MATCHES MKL)
# miro: fix for MKL static linking (-lc not needed for PGI )
set (MATH_LIBS ${MATH_LIBS} -ldl -lc)
# fix for MKL static linking (-lc not needed for PGI)
# radovan: why is -lc added also for PGI? when exactly is it needed?
set(MATH_LIBS ${MATH_LIBS} -ldl -lc)
endif()
endif()