diff --git a/Installation/cmake/modules/CGAL_SetupFlags.cmake b/Installation/cmake/modules/CGAL_SetupFlags.cmake index 88798bba88f..7393f446139 100644 --- a/Installation/cmake/modules/CGAL_SetupFlags.cmake +++ b/Installation/cmake/modules/CGAL_SetupFlags.cmake @@ -57,6 +57,10 @@ if ( NOT CMAKE_BUILD_TYPE ) 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" ) message( FATAL_ERROR "${CMAKE_BUILD_TYPE} is not a valid build type: only Release or Debug is allowed" ) endif() diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 4bae87ab6f5..1e592599bff 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -34,6 +34,10 @@ #include #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 #include