Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SofaKernel] Remove deprecated SOFA_DEBUG macro #1232

Merged
merged 1 commit into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions SofaKernel/cmake/CompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions SofaKernel/modules/SofaBaseMechanics/MechanicalObject.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ Data<typename MechanicalObject<DataTypes>::VecCoord>* MechanicalObject<DataTypes
}
}
Data<typename MechanicalObject<DataTypes>::VecCoord>* d = vectorsCoord[v.index];
#if defined(SOFA_DEBUG) || !defined(NDEBUG)
#if !defined(NDEBUG)
const typename MechanicalObject<DataTypes>::VecCoord& val = d->getValue();
if (!val.empty() && val.size() != (unsigned int)this->getSize())
{
Expand All @@ -1524,7 +1524,7 @@ const Data<typename MechanicalObject<DataTypes>::VecCoord>* MechanicalObject<Dat
if (v.index < vectorsCoord.size() && vectorsCoord[v.index] != nullptr)
{
const Data<typename MechanicalObject<DataTypes>::VecCoord>* d = vectorsCoord[v.index];
#if defined(SOFA_DEBUG) || !defined(NDEBUG)
#if !defined(NDEBUG)
const typename MechanicalObject<DataTypes>::VecCoord& val = d->getValue();
if (!val.empty() && val.size() != (unsigned int)this->getSize())
{
Expand Down Expand Up @@ -1568,7 +1568,7 @@ Data<typename MechanicalObject<DataTypes>::VecDeriv>* MechanicalObject<DataTypes
}
Data<typename MechanicalObject<DataTypes>::VecDeriv>* d = vectorsDeriv[v.index];

#if defined(SOFA_DEBUG) || !defined(NDEBUG)
#if !defined(NDEBUG)
const typename MechanicalObject<DataTypes>::VecDeriv& val = d->getValue();
if (!val.empty() && val.size() != (unsigned int)this->getSize())
{
Expand All @@ -1586,7 +1586,7 @@ const Data<typename MechanicalObject<DataTypes>::VecDeriv>* MechanicalObject<Dat
{
const Data<typename MechanicalObject<DataTypes>::VecDeriv>* d = vectorsDeriv[v.index];

#if defined(SOFA_DEBUG) || !defined(NDEBUG)
#if !defined(NDEBUG)
const typename MechanicalObject<DataTypes>::VecDeriv& val = d->getValue();
if (!val.empty() && val.size() != (unsigned int)this->getSize())
{
Expand Down