mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-11-21 03:11:25 +08:00
do not try to use Eigen's blas/lapack if they cannot be compiled
This commit is contained in:
parent
c78b5fd9aa
commit
14b164b00e
@ -314,10 +314,6 @@ else()
|
||||
add_subdirectory(test EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
add_subdirectory(unsupported)
|
||||
|
||||
add_subdirectory(demos EXCLUDE_FROM_ALL)
|
||||
|
||||
if(NOT MSVC)
|
||||
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
||||
add_subdirectory(blas)
|
||||
@ -328,6 +324,10 @@ if(NOT MSVC)
|
||||
endif()
|
||||
endif(NOT MSVC)
|
||||
|
||||
add_subdirectory(unsupported)
|
||||
|
||||
add_subdirectory(demos EXCLUDE_FROM_ALL)
|
||||
|
||||
# must be after test and unsupported, for configuring buildtests.in
|
||||
add_subdirectory(scripts EXCLUDE_FROM_ALL)
|
||||
|
||||
|
@ -3,35 +3,45 @@ include_directories(../../test ../../unsupported ../../Eigen)
|
||||
|
||||
set(SPARSE_LIBS "")
|
||||
|
||||
# configure blas/lapack
|
||||
if(CMAKE_Fortran_COMPILER_WORKS)
|
||||
set(BLAS_FOUND TRUE)
|
||||
set(LAPACK_FOUND TRUE)
|
||||
set(BLAS_LIBRARIES eigen_blas_static)
|
||||
set(LAPACK_LIBRARIES eigen_lapack_static)
|
||||
else()
|
||||
# TODO search for default blas/lapack
|
||||
endif()
|
||||
|
||||
find_package(Cholmod)
|
||||
if(CHOLMOD_FOUND)
|
||||
if(CHOLMOD_FOUND AND BLAS_FOUND AND LAPACK_FOUND)
|
||||
add_definitions("-DEIGEN_CHOLMOD_SUPPORT")
|
||||
include_directories(${CHOLMOD_INCLUDES})
|
||||
set(SPARSE_LIBS ${SPARSE_LIBS} ${CHOLMOD_LIBRARIES} eigen_blas_static eigen_lapack_static)
|
||||
set(SPARSE_LIBS ${SPARSE_LIBS} ${CHOLMOD_LIBRARIES} ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
ei_add_property(EIGEN_TESTED_BACKENDS "Cholmod, ")
|
||||
else(CHOLMOD_FOUND)
|
||||
else()
|
||||
ei_add_property(EIGEN_MISSING_BACKENDS "Cholmod, ")
|
||||
endif(CHOLMOD_FOUND)
|
||||
endif()
|
||||
|
||||
find_package(Umfpack)
|
||||
if(UMFPACK_FOUND)
|
||||
if(UMFPACK_FOUND AND BLAS_FOUND)
|
||||
add_definitions("-DEIGEN_UMFPACK_SUPPORT")
|
||||
include_directories(${UMFPACK_INCLUDES})
|
||||
set(SPARSE_LIBS ${SPARSE_LIBS} ${UMFPACK_LIBRARIES} eigen_blas_static)
|
||||
set(SPARSE_LIBS ${SPARSE_LIBS} ${UMFPACK_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
ei_add_property(EIGEN_TESTED_BACKENDS "UmfPack, ")
|
||||
else(UMFPACK_FOUND)
|
||||
else()
|
||||
ei_add_property(EIGEN_MISSING_BACKENDS "UmfPack, ")
|
||||
endif(UMFPACK_FOUND)
|
||||
endif()
|
||||
|
||||
find_package(SuperLU)
|
||||
if(SUPERLU_FOUND)
|
||||
if(SUPERLU_FOUND AND BLAS_FOUND)
|
||||
add_definitions("-DEIGEN_SUPERLU_SUPPORT")
|
||||
include_directories(${SUPERLU_INCLUDES})
|
||||
set(SPARSE_LIBS ${SPARSE_LIBS} ${SUPERLU_LIBRARIES} eigen_blas_static)
|
||||
set(SPARSE_LIBS ${SPARSE_LIBS} ${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
ei_add_property(EIGEN_TESTED_BACKENDS "SuperLU, ")
|
||||
else(SUPERLU_FOUND)
|
||||
else()
|
||||
ei_add_property(EIGEN_MISSING_BACKENDS "SuperLU, ")
|
||||
endif(SUPERLU_FOUND)
|
||||
endif()
|
||||
|
||||
find_package(GoogleHash)
|
||||
if(GOOGLEHASH_FOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user