Skip to content
Snippets Groups Projects
Commit 6b92d342 authored by Dominik Thoennes's avatar Dominik Thoennes
Browse files

extend WALBERLA_STL_BOUNDS_CHECK and use it in test

parent fabc0327
No related branches found
No related tags found
No related merge requests found
......@@ -373,6 +373,7 @@ endif ( )
if( WALBERLA_CXX_COMPILER_IS_GNU OR WALBERLA_CXX_COMPILER_IS_INTEL OR WALBERLA_CXX_COMPILER_IS_CLANG )
if ( WALBERLA_STL_BOUNDS_CHECKS )
add_definitions ( "-D_GLIBCXX_DEBUG" )
add_definitions ( "-D_LIBCPP_DEBUG" )
endif()
endif()
......
......@@ -41,6 +41,8 @@
#cmakedefine WALBERLA_THREAD_SAFE_LOGGING
#cmakedefine WALBERLA_STL_BOUNDS_CHECKS
// Compiler
#cmakedefine WALBERLA_CXX_COMPILER_IS_GNU
#cmakedefine WALBERLA_CXX_COMPILER_IS_INTEL
......
......@@ -19,11 +19,12 @@
//======================================================================================================================
#include <vector>
#include "waLBerlaDefinitions.h"
int main(int /*argc*/, char** /*argv*/)
{
int ret = 1;
#ifdef _GLIBCXX_DEBUG
#ifdef WALBERLA_STL_BOUNDS_CHECKS
std::vector< int > a(100);
// this throws an exception if the debug STL is used
// otherwise main will return 0 and the test fails since it is expected to fail
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment