aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2018-05-22 21:04:32 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2018-05-22 21:04:32 +0200
commit750af063629cd366f6d01985b37a21ebc37a5af3 (patch)
tree51855cfec9e99154ad79f3bc7003848ceb134c3c
parentd06a753d1017255f2a10a5b00a830865c30fe4df (diff)
Add an option to test with external BLAS library
-rw-r--r--cmake/EigenTesting.cmake4
-rw-r--r--test/CMakeLists.txt9
2 files changed, 13 insertions, 0 deletions
diff --git a/cmake/EigenTesting.cmake b/cmake/EigenTesting.cmake
index 16d6d279f..7d2d63722 100644
--- a/cmake/EigenTesting.cmake
+++ b/cmake/EigenTesting.cmake
@@ -679,6 +679,10 @@ macro(ei_set_build_string)
set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-${LOCAL_COMPILER_FLAGS})
endif()
+ if(EIGEN_TEST_EXTERNAL_BLAS)
+ set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-external_blas)
+ endif()
+
ei_is_64bit_env(IS_64BIT_ENV)
if(NOT IS_64BIT_ENV)
set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-32bit)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f8deafc07..073effd81 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -30,6 +30,15 @@ if(NOT EIGEN_Fortran_COMPILER_WORKS)
find_package(LAPACK QUIET)
endif()
+# TODO do the same for EXTERNAL_LAPACK
+option(EIGEN_TEST_EXTERNAL_BLAS "Use external BLAS library for testsuite" OFF)
+if(EIGEN_TEST_EXTERNAL_BLAS)
+ find_package(BLAS REQUIRED)
+ message(STATUS "BLAS_COMPILER_FLAGS: ${BLAS_COMPILER_FLAGS}")
+ add_definitions("-DEIGEN_USE_BLAS") # is adding ${BLAS_COMPILER_FLAGS} necessary?
+ list(APPEND EXTERNAL_LIBS "${BLAS_LIBRARIES}")
+endif(EIGEN_TEST_EXTERNAL_BLAS)
+
# configure blas/lapack (use Eigen's ones)
set(EIGEN_BLAS_LIBRARIES eigen_blas)
set(EIGEN_LAPACK_LIBRARIES eigen_lapack)