From a98cd3e534801f25b103d6bc829c0e090aa1cabf Mon Sep 17 00:00:00 2001 From: Username404 Date: Tue, 9 Aug 2022 10:18:00 +0200 Subject: [PATCH] CMakeLists.txt: Set CMAKE_UNITY_BUILD to TRUE by default Signed-off-by: Username404 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14d66cf..b2740f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,9 @@ configure_file("resources/${PROJECT_NAME}.rc" "processed/${PROJECT_NAME}.rc" @ON set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +if (NOT DEFINED CMAKE_UNITY_BUILD) + set(CMAKE_UNITY_BUILD TRUE) +endif() include(CheckPIESupported) check_pie_supported(LANGUAGES CXX) set(USER_DEFINED_PIE (DEFINED CMAKE_POSITION_INDEPENDENT_CODE))