# HG changeset patch # User Charles Pigott # Date 2020-09-24 16:48:03 # Node ID 0af03fb87f42e211eabd1a0ac8c6b19df2f778b3 # Parent bfcbae8b4f89fd9a91b6473ed1e67501a6b01e03 Codechange: Set CMAKE_BUILD_TYPE to default to debug if not otherwise set diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,11 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINAR 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)