mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-17 16:46:59 +02:00
[cmake] more modules, general "cleanup" (#3126)
Successor to that old MoltenVK PR. Does a lot of cleanups within root CMakeLists.txt, hands over MoltenVK and VulkanValidationLayers to CPMUtil, and separates out common operations into my modules. Hopefully reduces the monstrosity that is root CMakeLists.txt. Please test: - builds on all platforms - VulkanValidationLayers Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3126 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
parent
1d2b9de496
commit
18135424df
21 changed files with 697 additions and 638 deletions
17
externals/cmake-modules/UseLTO.cmake
vendored
Normal file
17
externals/cmake-modules/UseLTO.cmake
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2025 crueter
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
## UseLTO ##
|
||||
|
||||
# Enable Interprocedural Optimization (IPO).
|
||||
# Self-explanatory.
|
||||
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT COMPILER_SUPPORTS_LTO)
|
||||
if(NOT COMPILER_SUPPORTS_LTO)
|
||||
message(FATAL_ERROR
|
||||
"Your compiler does not support interprocedural optimization"
|
||||
" (IPO).")
|
||||
endif()
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${COMPILER_SUPPORTS_LTO})
|
||||
Loading…
Add table
Add a link
Reference in a new issue