From c85b48f23eba745ee961f96f4bbef16b40c58db3 Mon Sep 17 00:00:00 2001 From: James Larrowe Date: Sun, 16 Aug 2020 13:58:02 -0400 Subject: [PATCH] Default to debug when building in develop mode --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b24e8f65..73c0f9ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,8 +15,13 @@ project(rgbds option(DEVELOP "build in development mode" OFF) set(DEFAULT_BUILD_TYPE "Release") -if(NOT CMAKE_BUILD_TYPE AND NOT DEVELOP) - set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}") +set(DEVELOP_BUILD_TYPE "Debug") +if(NOT CMAKE_BUILD_TYPE) + if(DEVELOP) + set(CMAKE_BUILD_TYPE "${DEVELOP_BUILD_TYPE}") + else() + set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}") + endif() endif() # get real path of source and binary directories