BKE_assert(), only prints the error unless cmake define WITH_ASSERT_ABORT is enabled and it will call abort().

made this option advanced so people don't enable along with other features.
This commit is contained in:
Campbell Barton
2010-12-15 10:22:26 +00:00
parent eac46088e5
commit 35fa581403
3 changed files with 51 additions and 2 deletions

View File

@@ -128,6 +128,9 @@ option(WITH_PYTHON_INSTALL "Copy system python into the blender install fo
option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF)
mark_as_advanced(WITH_CXX_GUARDEDALLOC)
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BKE_assert()" OFF)
mark_as_advanced(WITH_ASSERT_ABORT)
if(APPLE)
option(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" ON)
option(USE_QTKIT "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF)
@@ -1011,6 +1014,10 @@ if(WITH_CXX_GUARDEDALLOC)
set(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
endif()
if(WITH_ASSERT_ABORT)
add_definitions(-DWITH_ASSERT_ABORT)
endif()
#-----------------------------------------------------------------------------
# Libraries