From 92db741c5363142d437a36b88b6aa50c57224ad8 Mon Sep 17 00:00:00 2001 From: Cristi Mitrana Date: Fri, 3 Jan 2020 12:17:43 +0200 Subject: [PATCH] Define _DEBUG for Debug builds --- CMakeLists.txt | 4 ++++ README.md | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9542da48c..54908acc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,6 +114,10 @@ else() add_definitions(-DUSE_OPENGLES_10) endif() +# Enable additional defines for the Debug build configuration +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") +set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") + #------------------------------------------------------------------------------- #add include directories set(COMMON_INCLUDE_DIRS diff --git a/README.md b/README.md index 7543220f6..e97c55208 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,11 @@ cmake . make ``` +NOTE: to generate a `Debug` build on Unix/Linux, run the Makefile generation step as: +```bash +cmake -DCMAKE_BUILD_TYPE=Debug . +``` + **On the Raspberry Pi:** Complete Raspberry Pi build instructions at [emulationstation.org](http://emulationstation.org/gettingstarted.html#install_rpi_standalone).