aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt19
1 files changed, 7 insertions, 12 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index ce3782171..c624950c2 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -5,18 +5,13 @@ if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h)
endif()
# check if we have a Fortran compiler
-include("../cmake/language_support.cmake")
-
-workaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)
-
-if(EIGEN_Fortran_COMPILER_WORKS)
- enable_language(Fortran OPTIONAL)
- if(NOT CMAKE_Fortran_COMPILER)
- set(EIGEN_Fortran_COMPILER_WORKS OFF)
- endif()
-endif()
-
-if(NOT EIGEN_Fortran_COMPILER_WORKS)
+include(CheckLanguage)
+check_language(Fortran)
+if(CMAKE_Fortran_COMPILER)
+ enable_language(Fortran)
+ set(EIGEN_Fortran_COMPILER_WORKS ON)
+else()
+ set(EIGEN_Fortran_COMPILER_WORKS OFF)
# search for a default Lapack library to complete Eigen's one
find_package(LAPACK QUIET)
endif()