Add -DDEBUG via add_definitions

This commit is contained in:
Pali Rohár 2013-02-05 16:56:16 +01:00
parent d291e598a3
commit db0fc4d49c

View file

@ -828,8 +828,9 @@ if(HAVE_GETOPT)
add_definitions(-DHAVE_GETOPT)
endif()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DDEBUG)
endif()
if(ENABLE_STRIP)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s")