From b96d0bd240c0b81947244e47a6568680d41ae348 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Tue, 4 Oct 2011 11:23:55 +0200 Subject: [PATCH] Added a flag to build blas/lapack. --- CMakeLists.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab44f22c1..44ff6d188 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -343,12 +343,24 @@ else() add_subdirectory(test EXCLUDE_FROM_ALL) endif() -if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) - add_subdirectory(blas) - add_subdirectory(lapack) + # The flag below can be removed when the CMake issue + # http://public.kitware.com/Bug/view.php?id=9220 + # is fixed and when the cmake_minimum_required(VERSION ...) + # is accordingly adapted. +if(MSVC) + set(EIGEN_BUILD_BLAS_LAPACK FALSE CACHE BOOL "Activates blas and lapack subfolders inclusion.") else() - add_subdirectory(blas EXCLUDE_FROM_ALL) - add_subdirectory(lapack EXCLUDE_FROM_ALL) + set(EIGEN_BUILD_BLAS_LAPACK TRUE CACHE BOOL "Activates blas and lapack subfolders inclusion.") +endif() + +if(EIGEN_BUILD_BLAS_LAPACK) + if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) + add_subdirectory(blas) + add_subdirectory(lapack) + else() + add_subdirectory(blas EXCLUDE_FROM_ALL) + add_subdirectory(lapack EXCLUDE_FROM_ALL) + endif() endif() add_subdirectory(unsupported)