Add a check that NDEBUG is not defined by test platforms

This commit is contained in:
Laurent Rineau 2012-01-25 11:14:17 +00:00
parent deb4956630
commit 7177fa5a63
2 changed files with 8 additions and 0 deletions

View File

@ -57,6 +57,10 @@ if ( NOT CMAKE_BUILD_TYPE )
endif() endif()
endif() endif()
if( RUNNING_CGAL_AUTO_TEST )
add_definitions(-DCGAL_TEST_SUITE)
endif()
if ( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" ) if ( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
message( FATAL_ERROR "${CMAKE_BUILD_TYPE} is not a valid build type: only Release or Debug is allowed" ) message( FATAL_ERROR "${CMAKE_BUILD_TYPE} is not a valid build type: only Release or Debug is allowed" )
endif() endif()

View File

@ -34,6 +34,10 @@
#include <windows.h> #include <windows.h>
#endif #endif
#if defined(CGAL_TEST_SUITE) && defined(NDEBUG)
# error The test-suite needs no NDEBUG defined
#endif // CGAL_TEST_SUITE and NDEBUG
// The following header file defines among other things BOOST_PREVENT_MACRO_SUBSTITUTION // The following header file defines among other things BOOST_PREVENT_MACRO_SUBSTITUTION
#include <boost/config.hpp> #include <boost/config.hpp>