diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b7ef4b660..c4f1f218a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - bindings/python : Add missing arg names in `visualizer-visitor.hpp` +- use deprecation, warning macros already provided by jrl-cmakemodules + +### Removed + +- Remove unused headers `deprecated-macros.hpp` and `deprecated-namespaces.hpp` +- Remove header `pinocchio/deprecation.hpp`, directly use generated `pinocchio/deprecated.hpp` +- macros.hpp : remove macros already provided by jrl-cmakemodules ## [3.7.0] - 2025-05-21 diff --git a/include/pinocchio/algorithm/parallel/geometry.hpp b/include/pinocchio/algorithm/parallel/geometry.hpp index 66ca88b6bf..43fbfdf9f4 100644 --- a/include/pinocchio/algorithm/parallel/geometry.hpp +++ b/include/pinocchio/algorithm/parallel/geometry.hpp @@ -8,7 +8,7 @@ #include "pinocchio/macros.hpp" // clang-format off -PINOCCHIO_PRAGMA_DEPRECATED_HEADER(pinocchio/algorithm/parallel/geometry.hpp, pinocchio/collision/parallel/geometry.hpp) +PINOCCHIO_DEPRECATED_HEADER(pinocchio/algorithm/parallel/geometry.hpp, pinocchio/collision/parallel/geometry.hpp) // clang-format on #include "pinocchio/collision/parallel/geometry.hpp" diff --git a/include/pinocchio/algorithm/parallel/omp.hpp b/include/pinocchio/algorithm/parallel/omp.hpp index ec0bab2d7d..352d320ba0 100644 --- a/include/pinocchio/algorithm/parallel/omp.hpp +++ b/include/pinocchio/algorithm/parallel/omp.hpp @@ -6,7 +6,7 @@ #define __pinocchio_algorithm_parallel_omp_hpp__ #include "pinocchio/macros.hpp" -PINOCCHIO_PRAGMA_DEPRECATED_HEADER( +PINOCCHIO_DEPRECATED_HEADER( pinocchio / algorithm / parallel / omp.hpp, pinocchio / utils / openmp.hpp) #include "pinocchio/utils/openmp.hpp" diff --git a/include/pinocchio/bindings/python/parsers/python.hpp b/include/pinocchio/bindings/python/parsers/python.hpp index f0571388ab..287ea1456c 100644 --- a/include/pinocchio/bindings/python/parsers/python.hpp +++ b/include/pinocchio/bindings/python/parsers/python.hpp @@ -8,7 +8,7 @@ #include "pinocchio/macros.hpp" // clang-format off -PINOCCHIO_PRAGMA_DEPRECATED_HEADER(pinocchio/bindings/python/parsers/python.hpp, pinocchio/parsers/python.hpp) +PINOCCHIO_DEPRECATED_HEADER(pinocchio/bindings/python/parsers/python.hpp, pinocchio/parsers/python.hpp) // clang-format on #include "pinocchio/parsers/python.hpp" diff --git a/include/pinocchio/deprecated-macros.hpp b/include/pinocchio/deprecated-macros.hpp deleted file mode 100644 index d25841e521..0000000000 --- a/include/pinocchio/deprecated-macros.hpp +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright (c) 2018 INRIA -// - -#ifndef __pinocchio_deprecated_macros_hpp__ -#define __pinocchio_deprecated_macros_hpp__ - -#ifdef PINOCCHIO_WITH_HPP_FCL - #ifdef PINOCCHIO_ENABLE_COMPATIBILITY_WITH_VERSION_1 // for backward compatibility - #define WITH_HPP_FCL - #endif -#endif - -#ifdef PINOCCHIO_WITH_URDFDOM - #ifdef PINOCCHIO_ENABLE_COMPATIBILITY_WITH_VERSION_1 // for backward compatibility - #define WITH_URDFDOM - #endif -#endif - -#endif // ifndef __pinocchio_deprecated_macros_hpp__ diff --git a/include/pinocchio/deprecated-namespaces.hpp b/include/pinocchio/deprecated-namespaces.hpp deleted file mode 100644 index 951fd62799..0000000000 --- a/include/pinocchio/deprecated-namespaces.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// -// Copyright (c) 2018 INRIA -// - -#ifndef __pinocchio_deprecated_namespaces_hpp__ -#define __pinocchio_deprecated_namespaces_hpp__ - -#if PINOCCHIO_ENABLE_COMPATIBILITY_WITH_VERSION_1 // do not warn -namespace se3 = ::pinocchio; -#endif - -#endif // ifndef __pinocchio_deprecated_namespaces_hpp__ diff --git a/include/pinocchio/deprecation.hpp b/include/pinocchio/deprecation.hpp deleted file mode 100644 index e2d6ba1ffc..0000000000 --- a/include/pinocchio/deprecation.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// -// Copyright (c) 2018 INRIA -// - -#ifndef __pinocchio_deprecation_hpp__ -#define __pinocchio_deprecation_hpp__ - -#include "pinocchio/deprecated.hpp" -#include "pinocchio/deprecated-macros.hpp" -#include "pinocchio/deprecated-namespaces.hpp" - -#endif // ifndef __pinocchio_deprecation_hpp__ diff --git a/include/pinocchio/fwd.hpp b/include/pinocchio/fwd.hpp index 0a56bafa22..cbee40d165 100644 --- a/include/pinocchio/fwd.hpp +++ b/include/pinocchio/fwd.hpp @@ -26,7 +26,7 @@ namespace pinocchio #endif #include "pinocchio/macros.hpp" -#include "pinocchio/deprecation.hpp" +#include "pinocchio/deprecated.hpp" #include "pinocchio/warning.hpp" #include "pinocchio/config.hpp" #include "pinocchio/unsupported.hpp" diff --git a/include/pinocchio/macros.hpp b/include/pinocchio/macros.hpp index 68086d987d..5ccdec72e7 100644 --- a/include/pinocchio/macros.hpp +++ b/include/pinocchio/macros.hpp @@ -6,7 +6,8 @@ #ifndef __pinocchio_macros_hpp__ #define __pinocchio_macros_hpp__ -#include +#include "pinocchio/deprecated.hpp" +#include "pinocchio/warning.hpp" // On Windows, __cplusplus is not necessarily set to the C++ version being used. // See https://docs.microsoft.com/fr-fr/cpp/build/reference/zc-cplusplus?view=vs-2019 for further @@ -36,28 +37,8 @@ #define PINOCCHIO_MAC_ARM64 #endif -#define PINOCCHIO_STRING_LITERAL(string) #string #define PINOCCHIO_NOEXCEPT noexcept -// For more details, visit -// https://stackoverflow.com/questions/171435/portability-of-warning-preprocessor-directive -#if defined(__GNUC__) || defined(__clang__) - #define PINOCCHIO_PRAGMA(x) _Pragma(#x) - #define PINOCCHIO_PRAGMA_MESSAGE(the_message) PINOCCHIO_PRAGMA(GCC message #the_message) - #define PINOCCHIO_PRAGMA_WARNING(the_message) PINOCCHIO_PRAGMA(GCC warning #the_message) - #define PINOCCHIO_PRAGMA_DEPRECATED(the_message) \ - PINOCCHIO_PRAGMA_WARNING(Deprecated : #the_message) - #define PINOCCHIO_PRAGMA_DEPRECATED_HEADER(old_header, new_header) \ - PINOCCHIO_PRAGMA_WARNING(Deprecated header file : #old_header has been replaced \ - by #new_header.\n Please use #new_header instead of #old_header.) -#else - #define PINOCCHIO_PRAGMA(x) - #define PINOCCHIO_PRAGMA_MESSAGE(the_message) - #define PINOCCHIO_PRAGMA_WARNING(the_message) - #define PINOCCHIO_PRAGMA_DEPRECATED(the_message) - #define PINOCCHIO_PRAGMA_DEPRECATED_HEADER(old_header, new_header) -#endif - /// \brief Function attribute to forbid inlining. /// This is a compiler hint that can be not respected. #define PINOCCHIO_DONT_INLINE EIGEN_DONT_INLINE @@ -244,7 +225,7 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_VARIADIC_MACROS #define _PINOCCHIO_CHECK_ARGUMENT_SIZE_2(size, expected_size) \ _PINOCCHIO_CHECK_ARGUMENT_SIZE_3( \ size, expected_size, \ - PINOCCHIO_STRING_LITERAL(size) " is different from " PINOCCHIO_STRING_LITERAL(expected_size)) + PINOCCHIO_WARN_STRINGISE(size) " is different from " PINOCCHIO_WARN_STRINGISE(expected_size)) #define _PINOCCHIO_CHECK_ARGUMENT_SIZE_1 diff --git a/include/pinocchio/math/casadi.hpp b/include/pinocchio/math/casadi.hpp index 385627380f..451e1faa28 100644 --- a/include/pinocchio/math/casadi.hpp +++ b/include/pinocchio/math/casadi.hpp @@ -8,7 +8,7 @@ #include "pinocchio/macros.hpp" // clang-format off -PINOCCHIO_PRAGMA_DEPRECATED_HEADER(pinocchio/math/casadi.hpp, pinocchio/autodiff/casadi.hpp) +PINOCCHIO_DEPRECATED_HEADER(pinocchio/math/casadi.hpp, pinocchio/autodiff/casadi.hpp) // clang-format on #include "pinocchio/autodiff/casadi.hpp" diff --git a/include/pinocchio/math/cppad.hpp b/include/pinocchio/math/cppad.hpp index 7994119ddd..011d1d356b 100644 --- a/include/pinocchio/math/cppad.hpp +++ b/include/pinocchio/math/cppad.hpp @@ -8,7 +8,7 @@ #include "pinocchio/macros.hpp" // clang-format off -PINOCCHIO_PRAGMA_DEPRECATED_HEADER(pinocchio/math/cppad.hpp, pinocchio/autodiff/cppad.hpp) +PINOCCHIO_DEPRECATED_HEADER(pinocchio/math/cppad.hpp, pinocchio/autodiff/cppad.hpp) // clang-format on #include "pinocchio/autodiff/cppad.hpp" diff --git a/include/pinocchio/math/cppadcg.hpp b/include/pinocchio/math/cppadcg.hpp index 4ea53f4201..a75b1858b9 100644 --- a/include/pinocchio/math/cppadcg.hpp +++ b/include/pinocchio/math/cppadcg.hpp @@ -8,7 +8,7 @@ #include "pinocchio/macros.hpp" // clang-format off -PINOCCHIO_PRAGMA_DEPRECATED_HEADER(pinocchio/math/cppadcg.hpp, pinocchio/codegen/cppadcg.hpp) +PINOCCHIO_DEPRECATED_HEADER(pinocchio/math/cppadcg.hpp, pinocchio/codegen/cppadcg.hpp) // clang-format on #include "pinocchio/codegen/cppadcg.hpp" diff --git a/include/pinocchio/parsers/sample-models.hpp b/include/pinocchio/parsers/sample-models.hpp index 79b9a5c0ba..dea420c445 100644 --- a/include/pinocchio/parsers/sample-models.hpp +++ b/include/pinocchio/parsers/sample-models.hpp @@ -8,7 +8,7 @@ #include "pinocchio/macros.hpp" // clang-format off -PINOCCHIO_PRAGMA_DEPRECATED_HEADER(pinocchio/parsers/sample-models.hpp, pinocchio/multibody/sample-models.hpp) +PINOCCHIO_DEPRECATED_HEADER(pinocchio/parsers/sample-models.hpp, pinocchio/multibody/sample-models.hpp) // clang-format on #include "pinocchio/multibody/sample-models.hpp" diff --git a/include/pinocchio/spatial/fcl-pinocchio-conversions.hpp b/include/pinocchio/spatial/fcl-pinocchio-conversions.hpp index a0824b3f1e..f234b6e744 100644 --- a/include/pinocchio/spatial/fcl-pinocchio-conversions.hpp +++ b/include/pinocchio/spatial/fcl-pinocchio-conversions.hpp @@ -8,7 +8,7 @@ #include "pinocchio/macros.hpp" // clang-format off -PINOCCHIO_PRAGMA_DEPRECATED_HEADER( +PINOCCHIO_DEPRECATED_HEADER( pinocchio/spatial/fcl-pinocchio-conversions.hpp, pinocchio/collision/fcl-pinocchio-conversions.hpp) // clang-format on diff --git a/include/pinocchio/unsupported.hpp b/include/pinocchio/unsupported.hpp index 7b06063493..dafdc2d18b 100644 --- a/include/pinocchio/unsupported.hpp +++ b/include/pinocchio/unsupported.hpp @@ -5,7 +5,7 @@ #ifndef __pinocchio_unsupported_hpp__ #define __pinocchio_unsupported_hpp__ -#include "pinocchio/deprecation.hpp" +#include "pinocchio/deprecated.hpp" #define PINOCCHIO_UNSUPPORTED PINOCCHIO_DEPRECATED #define PINOCCHIO_UNSUPPORTED_MESSAGE PINOCCHIO_DEPRECATED_MESSAGE diff --git a/sources.cmake b/sources.cmake index 4941711cbb..bf462fe188 100644 --- a/sources.cmake +++ b/sources.cmake @@ -173,9 +173,6 @@ set(${PROJECT_NAME}_CORE_PUBLIC_HEADERS ${PROJECT_SOURCE_DIR}/include/pinocchio/context.hpp ${PROJECT_SOURCE_DIR}/include/pinocchio/core/binary-op.hpp ${PROJECT_SOURCE_DIR}/include/pinocchio/core/unary-op.hpp - ${PROJECT_SOURCE_DIR}/include/pinocchio/deprecated-macros.hpp - ${PROJECT_SOURCE_DIR}/include/pinocchio/deprecated-namespaces.hpp - ${PROJECT_SOURCE_DIR}/include/pinocchio/deprecation.hpp ${PROJECT_SOURCE_DIR}/include/pinocchio/eigen-macros.hpp ${PROJECT_SOURCE_DIR}/include/pinocchio/fwd.hpp ${PROJECT_SOURCE_DIR}/include/pinocchio/macros.hpp