diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2017-04-02 21:41:33 +0800 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-04 09:35:39 -0400 |
commit | 87199ea66b171708736e85989bf9b0af89a805c1 (patch) | |
tree | 14705eb749251f45f58fefcdd1dd96a218079907 /Modules/CheckIPOSupported.cmake | |
parent | c92fd25661c08ff991a2482b8a5e42c8490cb3c2 (diff) | |
download | cmake-87199ea66b171708736e85989bf9b0af89a805c1.tar.gz |
CheckIPOSupported: Add Fortran support
Diffstat (limited to 'Modules/CheckIPOSupported.cmake')
-rw-r--r-- | Modules/CheckIPOSupported.cmake | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake index f0e476a42a..712a95e0c2 100644 --- a/Modules/CheckIPOSupported.cmake +++ b/Modules/CheckIPOSupported.cmake @@ -93,11 +93,14 @@ macro(_ipo_run_language_check language) string(COMPARE EQUAL "${language}" "C" is_c) string(COMPARE EQUAL "${language}" "CXX" is_cxx) + string(COMPARE EQUAL "${language}" "Fortran" is_fortran) if(is_c) set(copy_sources foo.c main.c) elseif(is_cxx) set(copy_sources foo.cpp main.cpp) + elseif(is_fortran) + set(copy_sources foo.f main.f) else() message(FATAL_ERROR "Language not supported") endif() @@ -204,12 +207,6 @@ function(check_ipo_supported) endif() endif() - list(FIND languages "Fortran" result) - if(NOT result EQUAL -1) - _ipo_not_supported("Fortran is not supported") - return() - endif() - if(NOT _CMAKE_IPO_SUPPORTED_BY_CMAKE) _ipo_not_supported("CMake doesn't support IPO for current compiler") return() |