Default to debug when building in develop mode

This commit is contained in:
James Larrowe
2020-08-16 13:58:02 -04:00
parent 5a9f2b7750
commit c85b48f23e

View File

@@ -15,9 +15,14 @@ project(rgbds
option(DEVELOP "build in development mode" OFF) option(DEVELOP "build in development mode" OFF)
set(DEFAULT_BUILD_TYPE "Release") set(DEFAULT_BUILD_TYPE "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT DEVELOP) 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}") set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}")
endif() endif()
endif()
# get real path of source and binary directories # get real path of source and binary directories
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH) get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)