diff options
author | Samir Benmendil <me@rmz.io> | 2020-10-12 12:24:08 +0100 |
---|---|---|
committer | Samir Benmendil <me@rmz.io> | 2021-01-27 13:26:40 +0000 |
commit | 288d456c2951013e423ae4107f0207ef4594bb45 (patch) | |
tree | 2be47187c3f0238a3d93951a0e7a96fa3f552a9c /blas | |
parent | 3f4684f87da4303063a194c7340f1485d1752ae0 (diff) |
Replace language_support module with builtin CheckLanguage
The workaround_9220 function was introduced a long time ago to
workaround a CMake issue with enable_language(OPTIONAL). Since then
CMake has clarified that the OPTIONAL keywords has not been
implemented[0].
A CheckLanguage module is now provided with CMake to check if a language
can be enabled. Use that instead.
[0] https://cmake.org/cmake/help/v3.18/command/enable_language.html
Diffstat (limited to 'blas')
-rw-r--r-- | blas/CMakeLists.txt | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/blas/CMakeLists.txt b/blas/CMakeLists.txt index 9887d5804..545bc989c 100644 --- a/blas/CMakeLists.txt +++ b/blas/CMakeLists.txt @@ -1,15 +1,13 @@ project(EigenBlas CXX) -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() +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) endif() add_custom_target(blas) |