ENABLE_UNITY_BUILD

This commit is contained in:
lizzie 2026-03-18 01:07:54 +00:00 committed by crueter
parent 453d1fda34
commit 0a222cbcd2
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
3 changed files with 9 additions and 0 deletions

View file

@ -66,6 +66,9 @@ if (YUZU_STATIC_ROOM)
set(fmt_FORCE_BUNDLED ON)
endif()
# my unity/jumbo build
option(ENABLE_UNITY_BUILD "Enable Unity/Jumbo build" OFF)
# qt stuff
option(ENABLE_QT "Enable the Qt frontend" ON)
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)

View file

@ -40,6 +40,7 @@ These options control dependencies.
- This option is subject for removal.
- `YUZU_TESTS` (ON) Compile tests - requires Catch2
- `ENABLE_LTO` (OFF) Enable link-time optimization
- `ENABLE_UNITY_BUILD` (OFF) Enables "Unity/Jumbo" builds
- Not recommended on Windows
- UNIX may be better off appending `-flto=thin` to compiler args
- `USE_FASTER_LINKER` (OFF) Check if a faster linker is available

View file

@ -7,6 +7,11 @@
# Enable modules to include each other's files
include_directories(.)
if (ENABLE_UNITY_BUILD)
set(CMAKE_UNITY_BUILD ON)
set(CMAKE_UNITY_BUILD_BATCH_SIZE 5000)
endif()
# Dynarmic
if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64 OR ARCHITECTURE_riscv64) AND NOT YUZU_STATIC_ROOM)
add_subdirectory(dynarmic)