Skip to content

Commit

Permalink
HACKING: document how to make debug builds
Browse files Browse the repository at this point in the history
Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
  • Loading branch information
zarvox committed Oct 15, 2011
1 parent 17948a1 commit 80894bc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -98,6 +98,10 @@ SET(DOC_OUTPUT_PATH ${CMAKE_BINARY_DIR}/doc)
if(CMAKE_C_FLAGS STREQUAL "") if(CMAKE_C_FLAGS STREQUAL "")
set(CMAKE_C_FLAGS "-O2") set(CMAKE_C_FLAGS "-O2")
endif() endif()
SET(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG=1")
SET(CMAKE_C_FLAGS_RELEASE "-O2")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")

add_definitions(-Wall) add_definitions(-Wall)


# Pretty much everyone is going to need the main includes # Pretty much everyone is going to need the main includes
Expand Down
18 changes: 18 additions & 0 deletions HACKING
Expand Up @@ -82,3 +82,21 @@ In general, for data obtained with the Kinect, we'll provide a raw and a


Avoid trailing whitespace. No lines should end in a tab or a space. Keep a Avoid trailing whitespace. No lines should end in a tab or a space. Keep a
newline (blank line) at the end of each file. newline (blank line) at the end of each file.

=== DEBUG BUILD ===

In order to build the binaries with debug symbols the following commands
can be used:

$ mkdir build
$ cd build
$ cmake ../ -DCMAKE_BUILD_TYPE=debug
$ make

If you want to build in release mode (with optimizations) but still have debug
symbols, try RelWithDebInfo:

$ mkdir build
$ cd build
$ cmake ../ -DCMAKE_BUILD_TYPE=RelWithDebInfo
$ make

0 comments on commit 80894bc

Please sign in to comment.