mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 12:49:35 +08:00
cmake: fix policy setting for newer cmake (CheckIPOSupported)
This commit is contained in:
parent
2269a500ef
commit
8778e84eba
@ -36,8 +36,6 @@ if(NOT ${CMAKE_VERSION} VERSION_LESS "3.15.0")
|
||||
if (WIN32)
|
||||
cmake_policy(SET CMP0091 NEW)
|
||||
message(STATUS "Setting policy CMP0091 to NEW")
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
message(STATUS "Setting policy CMP0069 to NEW")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -147,6 +145,7 @@ if (STATIC)
|
||||
endif()
|
||||
|
||||
# LTO
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT LTO_SUPPORTED OUTPUT error)
|
||||
if(LTO_SUPPORTED)
|
||||
|
Loading…
Reference in New Issue
Block a user