From 5f1df5b3890fb4ea8c9f2ba3e63fbc456ba335a1 Mon Sep 17 00:00:00 2001 From: Anthony Moore Date: Thu, 19 Dec 2024 13:17:44 -0700 Subject: [PATCH] Add a default CMAKE_BUILD_TYPE (#5691) (#5692) --- CMakeLists.txt | 5 +++++ docs/CONTRIBUTORS | 1 + 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17a2fefab..24ed3117e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,11 @@ project( LANGUAGES CXX ) +# Set default build type to Release if not specified +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE) +endif() + option( DEBUG_AND_RELEASE_AND_COVERAGE "Builds both the debug and release binaries, overriding CMAKE_BUILD_TYPE. Not supported under MSBuild." diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS index 8824b138f..fa06407a2 100644 --- a/docs/CONTRIBUTORS +++ b/docs/CONTRIBUTORS @@ -20,6 +20,7 @@ Andrei Kostovski Andrew Miloradovsky Andrew Nolte Anthony Donlon +Anthony Moore Arkadiusz Kozdra Arthur Rosa Aylon Chaim Porat