Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

HACKING: document how to make debug builds

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
  • Loading branch information...
commit 80894bc103690dc0ed8b4ce93cb11670fce0822c 1 parent 17948a1
@zarvox zarvox authored
Showing with 22 additions and 0 deletions.
  1. +4 −0 CMakeLists.txt
  2. +18 −0 HACKING
View
4 CMakeLists.txt
@@ -98,6 +98,10 @@ SET(DOC_OUTPUT_PATH ${CMAKE_BINARY_DIR}/doc)
if(CMAKE_C_FLAGS STREQUAL "")
set(CMAKE_C_FLAGS "-O2")
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)
# Pretty much everyone is going to need the main includes
View
18 HACKING
@@ -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
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
Please sign in to comment.
Something went wrong with that request. Please try again.