diff --git a/Sofa/framework/Core/CMakeLists.txt b/Sofa/framework/Core/CMakeLists.txt index 163f5ecbe6c..4cafffc1a62 100644 --- a/Sofa/framework/Core/CMakeLists.txt +++ b/Sofa/framework/Core/CMakeLists.txt @@ -400,6 +400,7 @@ if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") target_compile_options(${PROJECT_NAME} PRIVATE -Wno-attributes) endif() +sofa_treat_warnings_as_errors(${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Sofa.Framework) # IDE folder sofa_create_package_with_targets( diff --git a/Sofa/framework/Core/src/sofa/core/behavior/BaseForceField.h b/Sofa/framework/Core/src/sofa/core/behavior/BaseForceField.h index 3eb13c9cf1f..a4c88dd6d4e 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/BaseForceField.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/BaseForceField.h @@ -117,7 +117,7 @@ class SOFA_CORE_API BaseForceField : public virtual StateAccessor ConstMultiVecCoordId xId, ConstMultiVecDerivId vId) = 0; SOFA_ATTRIBUTE_DEPRECATED__ADDDFORCE_OVERLOAD() - virtual void addDForce(const MechanicalParams* mparams, MultiVecDerivId dfId) final; + void addDForce(const MechanicalParams* mparams, MultiVecDerivId dfId); /// \brief Accumulate the contribution of M, B, and/or K matrices multiplied /// by the dx vector with the given coefficients. diff --git a/Sofa/framework/Core/src/sofa/core/behavior/BaseMass.h b/Sofa/framework/Core/src/sofa/core/behavior/BaseMass.h index ae60269f8a2..ef74c95dfee 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/BaseMass.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/BaseMass.h @@ -63,7 +63,7 @@ class SOFA_CORE_API BaseMass : public virtual StateAccessor /// dx = M^-1 f SOFA_CORE_DEPRECATED_ACCFROMF() - virtual void accFromF(const MechanicalParams* mparams, MultiVecDerivId aid) final; + void accFromF(const MechanicalParams* mparams, MultiVecDerivId aid); /// Solve M x = b, or x = M^-1 b, where M is the mass matrix /// @@ -83,7 +83,7 @@ class SOFA_CORE_API BaseMass : public virtual StateAccessor virtual SReal getPotentialEnergy(const MechanicalParams* mparams, ConstMultiVecCoordId xId) const = 0; SOFA_ATTRIBUTE_DEPRECATED__GETPOTENTIALENERGY_OVERLOAD() - virtual SReal getPotentialEnergy(const MechanicalParams* mparams = mechanicalparams::defaultInstance()) const final; + SReal getPotentialEnergy(const MechanicalParams* mparams = mechanicalparams::defaultInstance()) const; /// (Mv,xMv+Iw) (linear and angular momenta against world origin) virtual type::Vec6 getMomentum(const MechanicalParams* mparams = mechanicalparams::defaultInstance()) const = 0; diff --git a/Sofa/framework/Core/src/sofa/core/behavior/Mass.h b/Sofa/framework/Core/src/sofa/core/behavior/Mass.h index d97329fa710..c80daee0ab8 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/Mass.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/Mass.h @@ -74,9 +74,6 @@ class Mass : virtual public ForceField, public BaseMass void solveLinearSystem(const MechanicalParams* mparams, MultiVecDerivId xId, ConstMultiVecDerivId bId) override; virtual void doSolveLinearSystem(const MechanicalParams* mparams, DataVecDeriv& x, const DataVecDeriv& b); - /// Mass forces (gravity) often have null derivative - void addDForce(const MechanicalParams* /*mparams*/, DataVecDeriv & /*df*/, const DataVecDeriv & /*dx*/ ) override; - /// Accumulate the contribution of M, B, and/or K matrices multiplied /// by the dx vector with the given coefficients. /// diff --git a/Sofa/framework/Core/src/sofa/core/behavior/Mass.inl b/Sofa/framework/Core/src/sofa/core/behavior/Mass.inl index 59cf2be1de0..4efc2c1e465 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/Mass.inl +++ b/Sofa/framework/Core/src/sofa/core/behavior/Mass.inl @@ -97,13 +97,6 @@ void Mass::doSolveLinearSystem(const MechanicalParams* mparams, this->getClassName() << "'. Behavior is undefined. Try using a linear solver."; } -template -void Mass::addDForce(const MechanicalParams* mparams, - DataVecDeriv & /*df*/, const DataVecDeriv & /*dx*/) -{ - SOFA_UNUSED(mparams); -} - template void Mass::addMBKdx(const MechanicalParams* mparams, MultiVecDerivId dfId) { diff --git a/Sofa/framework/Core/src/sofa/core/config.h.in b/Sofa/framework/Core/src/sofa/core/config.h.in index 8e691846ce4..2706743f874 100644 --- a/Sofa/framework/Core/src/sofa/core/config.h.in +++ b/Sofa/framework/Core/src/sofa/core/config.h.in @@ -154,7 +154,7 @@ SOFA_ATTRIBUTE_DEPRECATED("v26.12", "v27.12", "Use BaseContext instead of Contex SOFA_ATTRIBUTE_DEPRECATED("v26.12", "v27.12", "Use resetVec instead.") #endif -#ifdef SOFA_BUILD_SOFA_CORE +#if defined(SOFA_BUILD_SOFA_CORE) || defined(SOFA_BUILD_SOFA_SIMULATION_CORE) #define SOFA_CORE_DEPRECATED_BEGININTEGRATION() #else #define SOFA_CORE_DEPRECATED_BEGININTEGRATION() \ diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseLink.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseLink.cpp index 086728cffc9..d75f49f3ec8 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseLink.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseLink.cpp @@ -348,9 +348,9 @@ bool BaseLink::readFromSnapshot( const std::string& str ) /// From the link std::vector linkPathsFromLink; - std::string linkPath = this->getValueString(); - - std::istringstream istrLink(linkPath); + const std::string linkValue = this->getValueString(); + + std::istringstream istrLink(linkValue); std::string linkStringBis; while (istrLink >> linkStringBis) diff --git a/Sofa/framework/DefaultType/CMakeLists.txt b/Sofa/framework/DefaultType/CMakeLists.txt index a5abca90e96..e4b800ebf1b 100644 --- a/Sofa/framework/DefaultType/CMakeLists.txt +++ b/Sofa/framework/DefaultType/CMakeLists.txt @@ -77,6 +77,7 @@ add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.Helper Sofa.Type Sofa.LinearAlgebra) target_link_libraries(${PROJECT_NAME} PUBLIC Eigen3::Eigen) +sofa_treat_warnings_as_errors(${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Sofa.Framework) # IDE folder sofa_create_package_with_targets( diff --git a/Sofa/framework/DefaultType/src/sofa/defaulttype/typeinfo/models/FixedArrayTypeInfo.h b/Sofa/framework/DefaultType/src/sofa/defaulttype/typeinfo/models/FixedArrayTypeInfo.h index 394872fb63d..22ad103c449 100644 --- a/Sofa/framework/DefaultType/src/sofa/defaulttype/typeinfo/models/FixedArrayTypeInfo.h +++ b/Sofa/framework/DefaultType/src/sofa/defaulttype/typeinfo/models/FixedArrayTypeInfo.h @@ -88,7 +88,10 @@ struct FixedArrayTypeInfo } return true; } - return false; + else + { + return false; + } } template diff --git a/Sofa/framework/Helper/CMakeLists.txt b/Sofa/framework/Helper/CMakeLists.txt index a59ef06a737..c3d3ac604a6 100644 --- a/Sofa/framework/Helper/CMakeLists.txt +++ b/Sofa/framework/Helper/CMakeLists.txt @@ -291,6 +291,7 @@ else() target_compile_definitions(${PROJECT_NAME} PRIVATE "SOFA_BUILD_MULTI_CONFIGURATION=0") endif() +sofa_treat_warnings_as_errors(${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Sofa.Framework) # IDE folder sofa_create_package_with_targets( diff --git a/Sofa/framework/Helper/src/sofa/helper/BackTrace.cpp b/Sofa/framework/Helper/src/sofa/helper/BackTrace.cpp index 549ed6ec92b..2c1452a91dd 100644 --- a/Sofa/framework/Helper/src/sofa/helper/BackTrace.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/BackTrace.cpp @@ -190,8 +190,6 @@ static std::string SigDescription(int sig) return "SIGTERM: a termination request was sent to the program"; break; } - - return "Unknown signal"; } void BackTrace::sig(int sig) diff --git a/Sofa/framework/Helper/src/sofa/helper/system/DynamicLibrary.cpp b/Sofa/framework/Helper/src/sofa/helper/system/DynamicLibrary.cpp index 08eb4f4f15d..692d393b14b 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/DynamicLibrary.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/DynamicLibrary.cpp @@ -104,8 +104,8 @@ void * DynamicLibrary::getSymbolAddress(Handle handle, return nullptr; } # if defined(WIN32) - void *symbolAddress = ::GetProcAddress((HMODULE)handle.m_realHandle, - symbol.c_str()); + void *symbolAddress = reinterpret_cast(::GetProcAddress((HMODULE)handle.m_realHandle, + symbol.c_str())); # else void *symbolAddress = ::dlsym(handle.m_realHandle, symbol.c_str()); # endif diff --git a/Sofa/framework/Helper/src/sofa/helper/system/PipeProcess.cpp b/Sofa/framework/Helper/src/sofa/helper/system/PipeProcess.cpp index 5ecfe606de6..34504084a18 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/PipeProcess.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/PipeProcess.cpp @@ -192,7 +192,6 @@ bool PipeProcess::executeProcess(const std::string &command, const std::vector< if (exit != STILL_ACTIVE) break; - bool busy = false; for (int i=0; i<2; ++i) { DWORD n = BUFSIZE-nfill[i]; @@ -203,7 +202,6 @@ bool PipeProcess::executeProcess(const std::string &command, const std::vector< if (bread>0) { - busy = true; ReadFile(fds[i][0], buf[i]+nfill[i], n, &n, nullptr); nfill[i] += n; { diff --git a/Sofa/framework/LinearAlgebra/CMakeLists.txt b/Sofa/framework/LinearAlgebra/CMakeLists.txt index 87c821fbbc3..59564514769 100644 --- a/Sofa/framework/LinearAlgebra/CMakeLists.txt +++ b/Sofa/framework/LinearAlgebra/CMakeLists.txt @@ -81,6 +81,7 @@ if (SOFA_LINEARALGEBRA_HAVE_OPENMP) target_link_libraries(${PROJECT_NAME} PUBLIC OpenMP::OpenMP_CXX) endif() +sofa_treat_warnings_as_errors(${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Sofa.Framework) # IDE folder sofa_create_package_with_targets( diff --git a/Sofa/framework/LinearAlgebra/src/sofa/linearalgebra/CompressedRowSparseMatrixGeneric.h b/Sofa/framework/LinearAlgebra/src/sofa/linearalgebra/CompressedRowSparseMatrixGeneric.h index 6d17d739165..2f900d4555b 100644 --- a/Sofa/framework/LinearAlgebra/src/sofa/linearalgebra/CompressedRowSparseMatrixGeneric.h +++ b/Sofa/framework/LinearAlgebra/src/sofa/linearalgebra/CompressedRowSparseMatrixGeneric.h @@ -716,49 +716,51 @@ public : void compressCSR() { - if constexpr (!Policy::CompressZeros) return; - Index outValues = 0; - Index outRows = 0; - for (Index r = 0; r < static_cast(rowIndex.size()); ++r) - { - Index row = rowIndex[r]; - Index rBegin = rowBegin[r]; - Index rEnd = rowBegin[r+1]; - Index outRBegin = outValues; - for (Index p = rBegin; p != rEnd; ++p) + if constexpr (Policy::CompressZeros) + { + Index outValues = 0; + Index outRows = 0; + for (Index r = 0; r < static_cast(rowIndex.size()); ++r) { - if (!traits::empty(colsValue[p])) + Index row = rowIndex[r]; + Index rBegin = rowBegin[r]; + Index rEnd = rowBegin[r+1]; + Index outRBegin = outValues; + for (Index p = rBegin; p != rEnd; ++p) { - // keep this value - if (p != outValues) + if (!traits::empty(colsValue[p])) { - colsValue[outValues] = colsValue[p]; - colsIndex[outValues] = colsIndex[p]; + // keep this value + if (p != outValues) + { + colsValue[outValues] = colsValue[p]; + colsIndex[outValues] = colsIndex[p]; + } + ++outValues; } - ++outValues; - } - } - if(outValues != outRBegin) - { - // keep this row - if (r != outRows) - { - rowIndex[outRows] = row; } - if (r != outRows || rBegin != outRBegin) + if(outValues != outRBegin) { - rowBegin[outRows] = outRBegin; + // keep this row + if (r != outRows) + { + rowIndex[outRows] = row; + } + if (r != outRows || rBegin != outRBegin) + { + rowBegin[outRows] = outRBegin; + } + ++outRows; } - ++outRows; } - } - if (static_cast(rowIndex.size()) != outRows || static_cast(colsIndex.size()) != outValues) - { - rowBegin[outRows] = outValues; - rowIndex.resize(outRows); - rowBegin.resize(outRows+1); - colsIndex.resize(outValues); - colsValue.resize(outValues); + if (static_cast(rowIndex.size()) != outRows || static_cast(colsIndex.size()) != outValues) + { + rowBegin[outRows] = outValues; + rowIndex.resize(outRows); + rowBegin.resize(outRows+1); + colsIndex.resize(outValues); + colsValue.resize(outValues); + } } } diff --git a/Sofa/framework/Simulation/Common/CMakeLists.txt b/Sofa/framework/Simulation/Common/CMakeLists.txt index 25f85f1dad5..36fc0a5aed6 100644 --- a/Sofa/framework/Simulation/Common/CMakeLists.txt +++ b/Sofa/framework/Simulation/Common/CMakeLists.txt @@ -51,6 +51,7 @@ add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.Core Sofa.Simulation.Core) target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2::tinyxml2) # Private because not exported in API +sofa_treat_warnings_as_errors(${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Sofa.Framework) # IDE folder sofa_create_package_with_targets( diff --git a/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/ObjectElement.cpp b/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/ObjectElement.cpp index 99ac004b7d2..14e07050e9a 100644 --- a/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/ObjectElement.cpp +++ b/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/ObjectElement.cpp @@ -57,16 +57,16 @@ bool ObjectElement::init() bool ObjectElement::initNode() { core::objectmodel::BaseContext* ctx { nullptr }; - if (auto* parent = getParent()) + if (auto* parentElement = getParent()) { - if (auto* parentObj = parent->getObject()) + if (auto* parentObj = parentElement->getObject()) { ctx = parentObj->toBaseContext(); } else { msg_error("XML parser") << "Cannot access to a valid component from parent element \'" - << parent->getName() << "\' (type:\'" << parent->getAttribute("type") + << parentElement->getName() << "\' (type:\'" << parentElement->getAttribute("type") << "\') for the object element \'" << this->getName() << "\'"; } } diff --git a/Sofa/framework/Simulation/Core/CMakeLists.txt b/Sofa/framework/Simulation/Core/CMakeLists.txt index 0d8e20a8f04..73492511fb1 100644 --- a/Sofa/framework/Simulation/Core/CMakeLists.txt +++ b/Sofa/framework/Simulation/Core/CMakeLists.txt @@ -368,6 +368,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread" ) endif() +sofa_treat_warnings_as_errors(${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Sofa.Framework) # IDE folder sofa_create_package_with_targets( diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultAnimationLoop.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultAnimationLoop.cpp index 37f5ed12089..c30714304a0 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultAnimationLoop.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultAnimationLoop.cpp @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -175,6 +174,7 @@ void DefaultAnimationLoop::propagateAnimateBeginEvent(const core::ExecParams* pa void DefaultAnimationLoop::beginIntegration(const core::ExecParams* params, SReal dt) const { + SOFA_UNUSED(dt); propagateIntegrateBeginEvent(params); } diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalOperations.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalOperations.cpp index 3902dc421c8..4e29a6658c9 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalOperations.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalOperations.cpp @@ -27,6 +27,8 @@ #define SOFA_SIMULATION_CORE_MECHANICALCOMPUTECONTACTFORCEVISITOR_CPP #define SOFA_SIMULATION_CORE_MECHANICALADDMBK_TOMATRIXVISITOR_CPP #define SOFA_SIMULATION_CORE_MECHANICALAPPLYPROJECTIVECONSTRAINT_TOMATRIXVISITOR_CPP +#define SOFA_SIMULATION_MECHANICALVISITOR_MECHANICALPROPAGATEDXVISITOR_CPP +#define SOFA_SIMULATION_MECHANICALVISITOR_MECHANICALPROPAGATEDXANDRESETFORCEVISITOR_CPP #include #include #include diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/AccelerationBasedImplicitIntegrationScheme.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/AccelerationBasedImplicitIntegrationScheme.cpp index 1482b4e732a..a801125c824 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/AccelerationBasedImplicitIntegrationScheme.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/AccelerationBasedImplicitIntegrationScheme.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/ImplicitIntegrationScheme.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/ImplicitIntegrationScheme.h index cf8c36f6d72..7e6529053c8 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/ImplicitIntegrationScheme.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/ImplicitIntegrationScheme.h @@ -117,7 +117,7 @@ class SOFA_SIMULATION_CORE_API ImplicitIntegrationScheme : /// with $r$ being constant in term of $x$ and $k$ the integration factor returned by this function. /// /// This method is used to compute the compliance for contact corrections. - virtual SReal getVelocityIntegrationFactor() const = 0; + SReal getVelocityIntegrationFactor() const override = 0; /// The integration scheme solves a linear system. In this linear system the unknown has a unit. /// It can be the position, velocity or acceleration increase. In any case, this unknown need then @@ -131,7 +131,7 @@ class SOFA_SIMULATION_CORE_API ImplicitIntegrationScheme : /// with $r$ being constant in term of $x$ and $k$ the integration factor returned by this function. /// /// This method is used to compute the compliance for contact corrections. - virtual SReal getPositionIntegrationFactor() const = 0; + SReal getPositionIntegrationFactor() const override = 0; Data d_rayleighStiffness; ///< Rayleigh damping coefficient related to stiffness, > 0 Data d_rayleighMass; ///< Rayleigh damping coefficient related to mass, > 0 diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/VelocityBasedImplicitIntegrationScheme.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/VelocityBasedImplicitIntegrationScheme.cpp index 83ecd9b24c2..864a24bfac5 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/VelocityBasedImplicitIntegrationScheme.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/integrationscheme/VelocityBasedImplicitIntegrationScheme.cpp @@ -32,10 +32,6 @@ #include using sofa::simulation::mechanicalvisitor::MechanicalVOpVisitor; -#include -using sofa::simulation::mechanicalvisitor::MechanicalGetNonDiagonalMassesCountVisitor; - - namespace sofa::simulation::integrationscheme { diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/mechanicalvisitor/MechanicalIntegrationVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/mechanicalvisitor/MechanicalIntegrationVisitor.cpp index 4e32fddf18e..79dcaf62a70 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/mechanicalvisitor/MechanicalIntegrationVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/mechanicalvisitor/MechanicalIntegrationVisitor.cpp @@ -19,7 +19,7 @@ * * * Contact information: contact@sofa-framework.org * ******************************************************************************/ - +#define SOFA_SIMULATION_MECHANICALVISITOR_MECHANICALBEGININTEGRATIONVISITOR_CPP #include #include diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/mechanicalvisitor/MechanicalMassLinearSolveVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/mechanicalvisitor/MechanicalMassLinearSolveVisitor.cpp index defa3c8388a..429e5c81894 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/mechanicalvisitor/MechanicalMassLinearSolveVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/mechanicalvisitor/MechanicalMassLinearSolveVisitor.cpp @@ -20,7 +20,7 @@ * Contact information: contact@sofa-framework.org * ******************************************************************************/ -#include +#include #include diff --git a/Sofa/framework/Simulation/Graph/CMakeLists.txt b/Sofa/framework/Simulation/Graph/CMakeLists.txt index 9e7f4bf0af5..3d285d219ff 100644 --- a/Sofa/framework/Simulation/Graph/CMakeLists.txt +++ b/Sofa/framework/Simulation/Graph/CMakeLists.txt @@ -21,6 +21,7 @@ sofa_find_package(Sofa.Simulation.Common REQUIRED) add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.Simulation.Common) +sofa_treat_warnings_as_errors(${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Sofa.Framework) # IDE folder sofa_create_package_with_targets( diff --git a/Sofa/framework/Testing/CMakeLists.txt b/Sofa/framework/Testing/CMakeLists.txt index 5e0811e3f9b..9f30ba7993e 100644 --- a/Sofa/framework/Testing/CMakeLists.txt +++ b/Sofa/framework/Testing/CMakeLists.txt @@ -96,6 +96,7 @@ target_compile_options(${PROJECT_NAME} PUBLIC "-DGTEST_LINKED_AS_SHARED_LIBRARY= set(SOFA_TESTING_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources") +sofa_treat_warnings_as_errors(${PROJECT_NAME}) set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Sofa.Framework) # IDE folder sofa_create_package_with_targets(