mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
@@ -145,6 +145,18 @@ IF (SUITESPARSE)
|
||||
ENDIF (NOT EXISTS ${LAPACK_LIB})
|
||||
MESSAGE ("-- Found LAPACK library: ${LAPACK_LIB}")
|
||||
|
||||
# On Apple BLAS is linked with vecLib, so don't add it separately.
|
||||
IF (NOT APPLE)
|
||||
MESSAGE("-- Check for BLAS")
|
||||
FIND_LIBRARY(BLAS_LIB NAMES blas)
|
||||
IF (NOT EXISTS ${BLAS_LIB})
|
||||
MESSAGE(FATAL_ERROR
|
||||
"Can't find BLAS (needed for LAPACK and SuiteSparse.)"
|
||||
"Please specify -DBLAS_LIB=...")
|
||||
ENDIF (NOT EXISTS ${BLAS_LIB})
|
||||
MESSAGE ("-- Found BLAS library: ${BLAS_LIB}")
|
||||
ENDIF (NOT APPLE)
|
||||
|
||||
ELSE (SUITESPARSE)
|
||||
ADD_DEFINITIONS(-DCERES_NO_SUITESPARSE)
|
||||
ENDIF (SUITESPARSE)
|
||||
|
||||
@@ -119,6 +119,12 @@ IF (EXISTS ${METIS_LIB})
|
||||
${METIS_LIB})
|
||||
ENDIF (EXISTS ${METIS_LIB})
|
||||
|
||||
IF (EXISTS ${BLAS_LIB})
|
||||
SET(CERES_LIBRARY_DEPENDENCIES
|
||||
${CERES_LIBRARY_DEPENDENCIES}
|
||||
${BLAS_LIB})
|
||||
ENDIF (EXISTS ${BLAS_LIB})
|
||||
|
||||
IF (OPENMP_FOUND)
|
||||
SET(CERES_LIBRARY_DEPENDENCIES
|
||||
${CERES_LIBRARY_DEPENDENCIES}
|
||||
|
||||
Reference in New Issue
Block a user