summaryrefslogtreecommitdiffstats
path: root/Modules/CheckIPOSupported.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CheckIPOSupported.cmake')
-rw-r--r--Modules/CheckIPOSupported.cmake9
1 files changed, 3 insertions, 6 deletions
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake
index f0e476a..712a95e 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()