From 7f11d0f002fa9a154e9b0f862943f3053ec56808 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sat, 9 Dec 2023 19:21:52 +0100 Subject: [PATCH] make release builds by default --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00f22364..a87bb373 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,9 +126,10 @@ include(FindThreads) # enables compile_commands.json for clang-related tools (such as the clang LS) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -# build debug builds by default (if not specified otherwise) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Debug") +# build release builds by default (if not specified otherwise) +if(NOT DEFINED CMAKE_BUILD_TYPE) + message(NOTICE "No build type specified, defaulting to 'Release'") + set(CMAKE_BUILD_TYPE "Release") endif() if(UNIX)