From ca9aeaf93afaa610aab1ce585daa20ffcf27d3a7 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 27 Feb 2020 14:14:15 -0800 Subject: Defaulting CMAKE_BUILD_TYPE to Debug if it is not set (related to https://github.com/DiligentGraphics/DiligentEngine/issues/70) --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d4eb96b..37c15ee0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,11 @@ include(GNUInstallDirs) set_property(GLOBAL PROPERTY USE_FOLDERS ON) +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) + message(STATUS "CMAKE_BUILD_TYPE is not specified, default to Debug. Note that this is only relevant for single-configuration generators (such as Makefile Generators and Ninja).") +endif() + set(DEBUG_CONFIGURATIONS DEBUG CACHE INTERNAL "Debug configurations") set(RELEASE_CONFIGURATIONS RELEASE RELWITHDEBINFO MINSIZEREL CACHE INTERNAL "Release configurations") -- cgit v1.2.3