aboutsummaryrefslogtreecommitdiffhomepage
path: root/lapack
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-10-24 13:36:49 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-10-24 13:36:49 +0200
commite44c19d1ccc01a9d0217bf5341d387560702f2a3 (patch)
tree13dd9003c03c5bbc4610abb350569696b7a06f18 /lapack
parent1ddf88060b6475d3ee6b681bb0ed7b55d311ffa5 (diff)
hopefully this workaround of cmake bug #9220 works for MSVC too
Diffstat (limited to 'lapack')
-rw-r--r--lapack/CMakeLists.txt17
1 files changed, 6 insertions, 11 deletions
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})