diff options
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 67fd7a9d0d5..8d918a4a71e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,15 @@ IF(EXTRA_DEBUG) ADD_DEFINITIONS(-D EXTRA_DEBUG) ENDIF(EXTRA_DEBUG) +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFE_MUTEX") + +OPTION (WITH_DEBUG_FULL "Enable malloc debug library (only debug builds)" OFF) +IF(WITH_DEBUG_FULL) + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC") +ENDIF() + IF(ENABLED_DEBUG_SYNC) ADD_DEFINITIONS(-D ENABLED_DEBUG_SYNC) ENDIF(ENABLED_DEBUG_SYNC) |