Commit a4085cc1 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Fix usage of Boost.

parent dc2e397a
......@@ -76,14 +76,14 @@ if(BUILD_PYTHON_INTERFACE)
endif()
# Required dependencies
set(BOOST_COMPONENTS thread date_time system)
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} filesystem unit_test_framework chrono)
ADD_PROJECT_DEPENDENCY(Boost REQUIRED)
find_package(Boost REQUIRED COMPONENTS filesystem unit_test_framework chrono timer)
if (BUILD_PYTHON_INTERFACE)
FINDPYTHON()
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
set(BOOST_COMPONENTS python)
search_for_boost()
endif ()
search_for_boost()
# Optional dependencies
ADD_PROJECT_DEPENDENCY(octomap PKG_CONFIG_REQUIRES "octomap >= 1.6")
if(octomap_FOUND)
......@@ -123,7 +123,6 @@ FIND_PACKAGE(assimp REQUIRED)
SET(${PROJECT_NAME}_HEADERS
include/hpp/fcl/collision_data.h
include/hpp/fcl/profile.h
include/hpp/fcl/BV/kIOS.h
include/hpp/fcl/BV/BV.h
include/hpp/fcl/BV/RSS.h
......@@ -180,7 +179,6 @@ endif ()
add_subdirectory(test)
pkg_config_append_libs("hpp-fcl")
PKG_CONFIG_APPEND_BOOST_LIBS(thread date_time system)
IF(HPP_FCL_HAVE_OCTOMAP)
# FCL_HAVE_OCTOMAP kept for backward compatibility reasons.
PKG_CONFIG_APPEND_CFLAGS(
......
......@@ -41,7 +41,6 @@
/// @cond INTERNAL
#include <hpp/fcl/math/transform.h>
#include <boost/math/special_functions/erf.hpp>
namespace hpp
{
......
......@@ -50,7 +50,6 @@
#include <hpp/fcl/narrowphase/narrowphase.h>
#include <hpp/fcl/internal/traversal.h>
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
#include <limits>
#include <vector>
......
......@@ -68,7 +68,6 @@ set(${LIBRARY_NAME}_SOURCES
intersect.cpp
math/transform.cpp
traversal/traversal_recurse.cpp
profile.cpp
distance.cpp
BVH/BVH_utility.cpp
BVH/BV_fitter.cpp
......@@ -158,13 +157,7 @@ ADD_HEADER_GROUP(PROJECT_HEADERS_FULL_PATH)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
PUBLIC
${Boost_THREAD_LIBRARY}
${Boost_DATE_TIME_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_CHRONO_LIBRARY} # Required on Windows. Don't know why.
# Boost::thread
# Boost::date_time
# Boost::system
Boost::boost
)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
......@@ -183,7 +176,6 @@ endif()
target_include_directories(${LIBRARY_NAME}
SYSTEM PUBLIC
${EIGEN3_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
target_include_directories(${LIBRARY_NAME}
SYSTEM PRIVATE
......
......@@ -39,7 +39,7 @@
#include <iostream>
#include <limits>
#include <vector>
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/math/special_functions/fpclassify.hpp> // isnan.
#include <hpp/fcl/internal/tools.h>
namespace hpp
......
......@@ -5,8 +5,10 @@ macro(add_fcl_test test_name source)
target_link_libraries(${test_name}
PUBLIC
hpp-fcl
${Boost_LIBRARIES}
Boost::unit_test_framework
Boost::chrono
Boost::filesystem
Boost::timer
utility
)
target_compile_options(${test_name} PRIVATE "-Wno-c99-extensions")
......@@ -63,8 +65,8 @@ ENDIF()
target_link_libraries(test-benchmark
PUBLIC
utility
${Boost_CHRONO_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
Boost::chrono
Boost::filesystem
${PROJECT_NAME}
)
......
......@@ -40,7 +40,6 @@
#define BOOST_TEST_MODULE FCL_BOX_BOX
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#define CHECK_CLOSE_TO_0(x, eps) BOOST_CHECK_CLOSE ((x + 1.0), (1.0), (eps))
......
......@@ -39,7 +39,6 @@
#define BOOST_TEST_MODULE FCL_BROADPHASE
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#include <hpp/fcl/config.h>
#include <hpp/fcl/broadphase/broadphase.h>
......
......@@ -38,7 +38,6 @@
#define BOOST_TEST_MODULE FCL_BVH_MODELS
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#include <boost/filesystem.hpp>
#include "fcl_resources/config.h"
......
......@@ -38,7 +38,6 @@
#define BOOST_TEST_MODULE FCL_GEOMETRIC_SHAPES
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#define CHECK_CLOSE_TO_0(x, eps) BOOST_CHECK_CLOSE ((x + 1.0), (1.0), (eps))
......
......@@ -38,7 +38,6 @@
#define BOOST_TEST_MODULE FCL_GEOMETRIC_SHAPES
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#define CHECK_CLOSE_TO_0(x, eps) BOOST_CHECK_CLOSE ((x + 1.0), (1.0), (eps))
......
......@@ -38,7 +38,6 @@
#define BOOST_TEST_MODULE FCL_CAPSULE_CAPSULE
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#define CHECK_CLOSE_TO_0(x, eps) BOOST_CHECK_CLOSE ((x + 1.0), (1.0), (eps))
......
......@@ -42,10 +42,8 @@
#define BOOST_TEST_MODULE FCL_COLLISION
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#include <fstream>
#include <boost/filesystem.hpp>
#include <boost/assign/list_of.hpp>
#include <hpp/fcl/collision.h>
......
......@@ -38,7 +38,6 @@
#define BOOST_TEST_MODULE FCL_GEOMETRIC_SHAPES
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#include <hpp/fcl/shape/convex.h>
#include <hpp/fcl/collision.h>
......
......@@ -38,7 +38,6 @@
#define BOOST_TEST_MODULE FCL_DISTANCE
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#include <boost/timer.hpp>
#include <boost/filesystem.hpp>
......
......@@ -35,7 +35,6 @@
#define BOOST_TEST_MODULE FCL_DISTANCE_LOWER_BOUND
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
# include <boost/filesystem.hpp>
#include <hpp/fcl/fwd.hh>
......
......@@ -39,7 +39,6 @@
#define BOOST_TEST_MODULE FCL_FRONT_LIST
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#include <hpp/fcl/internal/traversal_node_bvhs.h>
#include <hpp/fcl/internal/traversal_node_setup.h>
......
......@@ -39,7 +39,6 @@
#define BOOST_TEST_MODULE FCL_GEOMETRIC_SHAPES
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#include <hpp/fcl/narrowphase/narrowphase.h>
#include <hpp/fcl/collision.h>
......
......@@ -39,7 +39,6 @@
#include <time.h>
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#include <Eigen/Geometry>
#include <hpp/fcl/narrowphase/narrowphase.h>
......
......@@ -39,7 +39,6 @@
#define BOOST_TEST_MODULE FCL_MATH
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>
#include <hpp/fcl/data_types.h>
#include <hpp/fcl/math/transform.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment