From e44c19d1ccc01a9d0217bf5341d387560702f2a3 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 24 Oct 2011 13:36:49 +0200 Subject: hopefully this workaround of cmake bug #9220 works for MSVC too --- lapack/CMakeLists.txt | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'lapack') diff --git a/lapack/CMakeLists.txt b/lapack/CMakeLists.txt index ad7c04274..062845a3f 100644 --- a/lapack/CMakeLists.txt +++ b/lapack/CMakeLists.txt @@ -1,19 +1,14 @@ project(EigenLapack CXX) -if( NOT DEFINED EIGEN_Fortran_COMPILER_WORKS OR EIGEN_Fortran_COMPILER_WORKS) +include("../cmake/language_support.cmake") - enable_language(Fortran OPTIONAL) +workaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS) - if(CMAKE_Fortran_COMPILER_WORKS) - set(EIGEN_Fortran_COMPILER_WORKS TRUE CACHE INTERNAL "workaround cmake's enable_language issue") - else() - set(EIGEN_Fortran_COMPILER_WORKS FALSE CACHE INTERNAL "workaround cmake's enable_language issue") - endif() - +if(EIGEN_Fortran_COMPILER_WORKS) + enable_language(Fortran OPTIONAL) endif() - add_custom_target(lapack) include_directories(../blas) @@ -21,7 +16,7 @@ set(EigenLapack_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp ../blas/xerbla.cpp ) -if(CMAKE_Fortran_COMPILER_WORKS) +if(EIGEN_Fortran_COMPILER_WORKS) get_filename_component(eigen_full_path_to_reference_to_reference_lapack "./reference/" ABSOLUTE) if(EXISTS ${eigen_full_path_to_reference_to_reference_lapack}) @@ -358,7 +353,7 @@ reference/ctbcon.f reference/dormhr.f reference/sla_ ) endif() -endif(CMAKE_Fortran_COMPILER_WORKS) +endif(EIGEN_Fortran_COMPILER_WORKS) add_library(eigen_lapack_static ${EigenLapack_SRCS}) add_library(eigen_lapack SHARED ${EigenLapack_SRCS}) -- cgit v1.2.3