cmake: lto: Set CMP0069 default behavior to NEW

* as stated on https://cmake.org/cmake/help/latest/policy/CMP0069.html
* and should reduce warnings
* picked from ninja-build/ninja

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
This commit is contained in:
Caio Oliveira 2025-09-29 19:10:59 -03:00
parent f5f8106cfb
commit 07acb9832a
Signed by: DraVee
GPG key ID: 362DA3DC1901E080

View file

@ -205,6 +205,7 @@ if(YUZU_ENABLE_LTO)
if(NOT COMPILER_SUPPORTS_LTO)
message(FATAL_ERROR "Your compiler does not support interprocedural optimization (IPO). Re-run CMake with -DYUZU_ENABLE_LTO=OFF.")
endif()
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${COMPILER_SUPPORTS_LTO})
endif()