Skip to content
Snippets Groups Projects
Unverified Commit fb34d214 authored by Louis Montaut's avatar Louis Montaut
Browse files

cmake: add macro for hpp-fcl retro compatibility

parent c8366034
No related branches found
No related tags found
No related merge requests found
......@@ -50,8 +50,9 @@ SET(DOXYGEN_USE_TEMPLATE_CSS TRUE)
# Need to be set before including base.cmake
# ----------------------------------------------------
option(INSTALL_DOCUMENTATION "Generate and install the documentation" OFF)
option(COAL_TURN_ASSERT_INTO_EXCEPTION "Turn some critical COAL asserts to exception." FALSE)
option(COAL_TURN_ASSERT_INTO_EXCEPTION "Turn some critical Coal asserts to exception." FALSE)
option(COAL_ENABLE_LOGGING "Activate logging for warnings or error messages. Turned on by default in Debug." FALSE)
option(COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL "Make Coal retro-compatible with HPP-FCL." FALSE)
# Check if the submodule cmake have been initialized
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
......
......@@ -59,6 +59,7 @@
#endif // COAL_HAS_OCTOMAP
namespace coal {
#ifdef COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL
// We keep the FCL_REAL typedef and the Vec[..]f typedefs for backward
// compatibility.
typedef double FCL_REAL;
......@@ -70,6 +71,7 @@ typedef Eigen::Matrix<FCL_REAL, 3, 3> Matrix3f;
typedef Eigen::Matrix<FCL_REAL, Eigen::Dynamic, 3, Eigen::RowMajor> Matrixx3f;
typedef Eigen::Matrix<FCL_REAL, Eigen::Dynamic, 2, Eigen::RowMajor> Matrixx2f;
typedef Eigen::Matrix<FCL_REAL, Eigen::Dynamic, Eigen::Dynamic> MatrixXf;
#endif
typedef double CoalScalar;
typedef Eigen::Matrix<CoalScalar, 3, 1> Vec3s;
......
......@@ -146,11 +146,13 @@ typedef shared_ptr<OcTree> OcTreePtr_t;
typedef shared_ptr<const OcTree> OcTreeConstPtr_t;
} // namespace coal
#ifdef COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL
namespace hpp {
namespace fcl {
using namespace coal;
using Transform3f = Transform3s; // For backward compatibility
} // namespace fcl
} // namespace hpp
#endif
#endif // COAL_FWD_HH
......@@ -234,6 +234,10 @@ if (COAL_TURN_ASSERT_INTO_EXCEPTION)
target_compile_definitions(${LIBRARY_NAME} PUBLIC -DCOAL_TURN_ASSERT_INTO_EXCEPTION)
endif()
if (COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL)
target_compile_definitions(${LIBRARY_NAME} PUBLIC -DCOAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL)
endif()
if(COAL_HAS_QHULL)
target_compile_definitions(${LIBRARY_NAME} PRIVATE -DCOAL_HAS_QHULL)
if (COAL_USE_SYSTEM_QHULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment