mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
CheckIPOSupported: Visual Studio and Xcode generators do not support IPO
This commit is contained in:
committed by
Brad King
parent
9a733c7bd6
commit
e05835c35b
@@ -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()
|
||||
|
||||
|
||||
@@ -7,3 +7,7 @@ run_cmake(default-lang-none)
|
||||
run_cmake(not-supported-by-cmake)
|
||||
run_cmake(not-supported-by-compiler)
|
||||
run_cmake(save-to-result)
|
||||
|
||||
if(RunCMake_GENERATOR MATCHES "^(Visual Studio |Xcode$)")
|
||||
run_cmake(not-supported-by-generator)
|
||||
endif()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
^CMake Error at .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(message\):
|
||||
IPO is not supported \(compiler doesn't support IPO\)\.
|
||||
IPO is not supported \(Compiler doesn't support IPO\)\.
|
||||
Call Stack \(most recent call first\):
|
||||
.*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(_ipo_not_supported\)
|
||||
not-supported-by-compiler\.cmake:[0-9]+ \(check_ipo_supported\)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,6 @@
|
||||
^CMake Error at .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(message\):
|
||||
IPO is not supported \(CMake doesn't support IPO for current generator\)\.
|
||||
Call Stack \(most recent call first\):
|
||||
.*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(_ipo_not_supported\)
|
||||
not-supported-by-generator\.cmake:[0-9]+ \(check_ipo_supported\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||
@@ -0,0 +1,6 @@
|
||||
project(${RunCMake_TEST} LANGUAGES C)
|
||||
|
||||
set(_CMAKE_IPO_SUPPORTED_BY_CMAKE YES)
|
||||
set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
|
||||
|
||||
check_ipo_supported()
|
||||
Reference in New Issue
Block a user