summaryrefslogtreecommitdiffstats
path: root/Modules/CheckIPOSupported.cmake
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2017-03-30 02:57:01 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-30 14:16:10 (GMT)
commite05835c35b5d31f31e1a55baf415c075b24a27ad (patch)
treea4cbdc61542825d4998b2d173fd19caa8a9de4e6 /Modules/CheckIPOSupported.cmake
parent9a733c7bd626f457a71632da46934995da7bbd4b (diff)
downloadCMake-e05835c35b5d31f31e1a55baf415c075b24a27ad.zip
CMake-e05835c35b5d31f31e1a55baf415c075b24a27ad.tar.gz
CMake-e05835c35b5d31f31e1a55baf415c075b24a27ad.tar.bz2
CheckIPOSupported: Visual Studio and Xcode generators do not support IPO
Diffstat (limited to 'Modules/CheckIPOSupported.cmake')
-rw-r--r--Modules/CheckIPOSupported.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake
index 6f7bc82..55c8901 100644
--- a/Modules/CheckIPOSupported.cmake
+++ b/Modules/CheckIPOSupported.cmake
@@ -203,7 +203,12 @@ function(check_ipo_supported)
endif()
if(NOT _CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER)
- _ipo_not_supported("compiler doesn't support IPO")
+ _ipo_not_supported("Compiler doesn't support IPO")
+ return()
+ endif()
+
+ if(CMAKE_GENERATOR MATCHES "^(Visual Studio |Xcode$)")
+ _ipo_not_supported("CMake doesn't support IPO for current generator")
return()
endif()