diff options
Diffstat (limited to 'Modules/CheckIPOSupported.cmake')
-rw-r--r-- | Modules/CheckIPOSupported.cmake | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake index 6bbde135ea..e04ab1c543 100644 --- a/Modules/CheckIPOSupported.cmake +++ b/Modules/CheckIPOSupported.cmake @@ -207,15 +207,17 @@ function(check_ipo_supported) endif() endif() - if(NOT _CMAKE_IPO_SUPPORTED_BY_CMAKE) - _ipo_not_supported("CMake doesn't support IPO for current compiler") - return() - endif() + foreach(lang ${languages}) + if(NOT _CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE) + _ipo_not_supported("CMake doesn't support IPO for current ${lang} compiler") + return() + endif() - if(NOT _CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER) - _ipo_not_supported("Compiler doesn't support IPO") - return() - endif() + if(NOT _CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER) + _ipo_not_supported("${lang} compiler doesn't support IPO") + return() + endif() + endforeach() if(CMAKE_GENERATOR MATCHES "^Visual Studio ") _ipo_not_supported("CMake doesn't support IPO for current generator") |