hopefully this workaround of cmake bug #9220 works for MSVC too

This commit is contained in:
Gael Guennebaud
2011-10-24 13:36:49 +02:00
parent 1ddf88060b
commit e44c19d1cc
3 changed files with 81 additions and 24 deletions

View File

@@ -1,19 +1,14 @@
project(EigenLapack CXX)
if( NOT DEFINED EIGEN_Fortran_COMPILER_WORKS OR EIGEN_Fortran_COMPILER_WORKS)
include("../cmake/language_support.cmake")
workaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)
if(EIGEN_Fortran_COMPILER_WORKS)
enable_language(Fortran OPTIONAL)
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()
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})