diff --git a/SofaKernel/cmake/CompilerOptions.cmake b/SofaKernel/cmake/CompilerOptions.cmake index 49f7b289b52..d68189622a8 100644 --- a/SofaKernel/cmake/CompilerOptions.cmake +++ b/SofaKernel/cmake/CompilerOptions.cmake @@ -48,18 +48,6 @@ if(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGL_SILENCE_DEPRECATION") endif() -## SOFA_DEBUG preprocessor macro -if(WIN32 OR APPLE) - # Reminder: multi-configuration generators like Visual Studio and XCode do - # not use CMAKE_BUILD_TYPE, as they generate all configurations in the - # project, not just one at a time! - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSOFA_DEBUG") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSOFA_DEBUG") -elseif(CMAKE_BUILD_TYPE MATCHES "Debug") - add_definitions("-DSOFA_DEBUG") -endif() - - ## OpenMP option(SOFA_OPENMP "Compile Sofa with OpenMP multithreading." OFF) diff --git a/SofaKernel/modules/SofaBaseMechanics/MechanicalObject.inl b/SofaKernel/modules/SofaBaseMechanics/MechanicalObject.inl index f6e2f1b8e84..46efec3d7d6 100644 --- a/SofaKernel/modules/SofaBaseMechanics/MechanicalObject.inl +++ b/SofaKernel/modules/SofaBaseMechanics/MechanicalObject.inl @@ -1501,7 +1501,7 @@ Data::VecCoord>* MechanicalObject::VecCoord>* d = vectorsCoord[v.index]; -#if defined(SOFA_DEBUG) || !defined(NDEBUG) +#if !defined(NDEBUG) const typename MechanicalObject::VecCoord& val = d->getValue(); if (!val.empty() && val.size() != (unsigned int)this->getSize()) { @@ -1524,7 +1524,7 @@ const Data::VecCoord>* MechanicalObject::VecCoord>* d = vectorsCoord[v.index]; -#if defined(SOFA_DEBUG) || !defined(NDEBUG) +#if !defined(NDEBUG) const typename MechanicalObject::VecCoord& val = d->getValue(); if (!val.empty() && val.size() != (unsigned int)this->getSize()) { @@ -1568,7 +1568,7 @@ Data::VecDeriv>* MechanicalObject::VecDeriv>* d = vectorsDeriv[v.index]; -#if defined(SOFA_DEBUG) || !defined(NDEBUG) +#if !defined(NDEBUG) const typename MechanicalObject::VecDeriv& val = d->getValue(); if (!val.empty() && val.size() != (unsigned int)this->getSize()) { @@ -1586,7 +1586,7 @@ const Data::VecDeriv>* MechanicalObject::VecDeriv>* d = vectorsDeriv[v.index]; -#if defined(SOFA_DEBUG) || !defined(NDEBUG) +#if !defined(NDEBUG) const typename MechanicalObject::VecDeriv& val = d->getValue(); if (!val.empty() && val.size() != (unsigned int)this->getSize()) {