From 85ca1c535e0d22a19a9a2157f0269f3a84c14059 Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Thu, 24 Sep 2020 17:48:03 +0100 Subject: [PATCH] Codechange: Set CMAKE_BUILD_TYPE to default to debug if not otherwise set --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fd8fbc880..2c7131df08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,11 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) message(FATAL_ERROR "In-source builds not allowed. Please run \"cmake ..\" from the bin directory") endif() +# Debug mode by default. +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Debug) +endif() + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)