From 58dd4fd7b46b1d2c5f0611cb6bba75bd59366375 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 13 Mar 2013 00:01:41 +0100 Subject: [PATCH] Include standard math runtime library when linking numerics --- cmake/Modules/FindSuiteSparse.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/FindSuiteSparse.cmake b/cmake/Modules/FindSuiteSparse.cmake index 664a05d2..d5fb546a 100644 --- a/cmake/Modules/FindSuiteSparse.cmake +++ b/cmake/Modules/FindSuiteSparse.cmake @@ -67,7 +67,10 @@ endif (NOT BLAS_FOUND) if (NOT LAPACK_FOUND) find_package (LAPACK ${SuiteSparse_QUIET} REQUIRED) endif (NOT LAPACK_FOUND) -set (SuiteSparse_EXTRA_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) + +# we also need the math part of the runtime library +find_library (MATH_LIBRARY NAMES "m") +set (SuiteSparse_EXTRA_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${MATH_LIBRARY}) # search paths for the library outside of standard system paths. these are the # paths in which the package managers on various distros put the files