[cmake] set policy CMP0138 NEW
with CMake >= 3.24 use the parent project compiler settings for check_ipo_supported as it might fail otherwise.
This commit is contained in:
parent
f61d1fd66a
commit
ebebc5b2a7
@ -9,6 +9,9 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
# https://github.com/android/ndk/issues/1444
|
||||
if (NOT ANDROID)
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
if(CMAKE_VERSION GREATER_EQUAL "3.24.0")
|
||||
cmake_policy(SET CMP0138 NEW)
|
||||
endif()
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT supported OUTPUT error)
|
||||
if (NOT supported)
|
||||
|
Loading…
Reference in New Issue
Block a user