From 6d4e462e425f20109fb066903ef3b68d83f12b03 Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:02:49 -0700 Subject: [PATCH] build: Ensure we default to Release build type. (#7080) --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 393df00d5..3f1fbee32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,12 @@ include(CMakeDependentOption) project(citra LANGUAGES C CXX ASM) +# Some submodules like to pick their own default build type if not specified. +# Make sure we default to Release build type always, unless the generator has custom types. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE) +endif() + if (APPLE) # Silence warnings on empty objects, for example when platform-specific code is #ifdef'd out. set(CMAKE_C_ARCHIVE_CREATE " Scr ")