aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--unsupported/test/CMakeLists.txt34
2 files changed, 26 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a09a2ea06..f2db30464 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt
index 854a41e70..d3ed2b515 100644
--- a/unsupported/test/CMakeLists.txt
+++ b/unsupported/test/CMakeLists.txt
@@ -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)