Commit e1ea2be9 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added cmake option to do stl checks in debug mode

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8068 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bd2e9986
......@@ -6,10 +6,21 @@ if (UNIX)
IF( NOT CMAKE_SYSTEM MATCHES "SunOS*")
# Pre initialize this variable
if ( NOT STL_VECTOR_CHECKS )
set ( STL_VECTOR_CHECKS false CACHE BOOL "Include full stl vector checks in debug mode (This option is only used in debug Mode!)" )
endif ( NOT STL_VECTOR_CHECKS )
set (CMAKE_CFLAGS_RELEASE "-O3 -DINCLUDE_TEMPLATES -W -Wall -Wno-unused -DNDEBUG")
set (CMAKE_CXX_FLAGS_RELEASE "-O3 -DINCLUDE_TEMPLATES -ftemplate-depth-100 -W -Wall -Wno-unused -DNDEBUG")
set (CMAKE_C_FLAGS_DEBUG "-g -DINCLUDE_TEMPLATES -W -Wall -Wno-unused -DDEBUG")
set (CMAKE_CXX_FLAGS_DEBUG "-g -DINCLUDE_TEMPLATES -ftemplate-depth-100 -W -Wall -Wno-unused -DDEBUG")
if ( STL_VECTOR_CHECKS )
set (CMAKE_C_FLAGS_DEBUG "-g -DINCLUDE_TEMPLATES -W -Wall -Wno-unused -DDEBUG -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC ")
set (CMAKE_CXX_FLAGS_DEBUG "-g -DINCLUDE_TEMPLATES -ftemplate-depth-100 -W -Wall -Wno-unused -DDEBUG -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
else ( STL_VECTOR_CHECKS )
set (CMAKE_C_FLAGS_DEBUG "-g -DINCLUDE_TEMPLATES -W -Wall -Wno-unused -DDEBUG")
set (CMAKE_CXX_FLAGS_DEBUG "-g -DINCLUDE_TEMPLATES -ftemplate-depth-100 -W -Wall -Wno-unused -DDEBUG")
endif ( STL_VECTOR_CHECKS )
ELSE ( NOT CMAKE_SYSTEM MATCHES "SunOS*")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment