Skip to content

Commit

Permalink
Remove boost::filesystem (flexible-collision-library#148)
Browse files Browse the repository at this point in the history
Remove boost::filesystem
  • Loading branch information
jslee02 authored Jul 23, 2016
1 parent 8d7c9c5 commit 77ad85c
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 44 deletions.
4 changes: 1 addition & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ platform: x64

environment:
CTEST_OUTPUT_ON_FAILURE: 1
BOOST_ROOT: C:\Libraries\boost_1_59_0
BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0

cache:
- C:\Program Files\libccd
Expand All @@ -36,7 +34,7 @@ before_build:
- cmd: set
- cmd: mkdir build
- cmd: cd build
- cmd: cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE=%Configuration% -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DCCD_INCLUDE_DIRS="C:\Program Files\libccd\include" -DCCD_LIBRARY="C:\Program Files\libccd\lib\ccd.lib" ..
- cmd: cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE=%Configuration% -DCCD_INCLUDE_DIRS="C:\Program Files\libccd\include" -DCCD_LIBRARY="C:\Program Files\libccd\lib\ccd.lib" ..

build:
project: C:\projects\fcl\build\fcl.sln
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### FCL 0.6.0 (2016-XX-XX)

* Removed Boost Test and replaced with Google Test: [#146](https://github.com/flexible-collision-library/fcl/pull/146), [#140](https://github.com/flexible-collision-library/fcl/pull/140)
* Removed dependency on boost: [#148](https://github.com/flexible-collision-library/fcl/pull/148), [#147](https://github.com/flexible-collision-library/fcl/pull/147), [#146](https://github.com/flexible-collision-library/fcl/pull/146), [#140](https://github.com/flexible-collision-library/fcl/pull/140)

### FCL 0.5.0 (2016-07-19)

Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ configure_file(
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/CMakeModules/cmake_uninstall.cmake")

find_package(Boost COMPONENTS filesystem system)
option(FCL_BUILD_TESTS "Build FCL tests" ${Boost_FOUND})
option(FCL_BUILD_TESTS "Build FCL tests" ON)
if(FCL_BUILD_TESTS)
enable_testing()
add_subdirectory(test)
Expand Down
3 changes: 1 addition & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
Dependencies:
============

- Boost (thread, date_time, unit_test_framework, filesystem)
- libccd (available at http://libccd.danfis.cz/)
- octomap (optional dependency, available at http://octomap.github.com)

Boost and libccd are mandatory dependencies. If octomap is not found,
libccd is the only mandatory dependency. If octomap is not found,
collision detection with octrees will not be possible.

For installation, CMake will also be needed (http://cmake.org).
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ FCL has the following features

## Installation

Before compiling FCL, please make libccd (for collision checking between convex objects and is available here https://github.com/danfis/libccd) is installed. For libccd, make sure to compile from github version instead of the zip file from the webpage, because one bug fixing is not included in the zipped version. To compile
the unit tests, Boost also needs to be to installed.
Before compiling FCL, please make libccd (for collision checking between convex objects and is available here https://github.com/danfis/libccd) is installed. For libccd, make sure to compile from github version instead of the zip file from the webpage, because one bug fixing is not included in the zipped version.

Some optional libraries need to be installed for some optional capability of FCL. For octree collision, please install the octomap library from http://octomap.github.com.

Expand Down
1 change: 0 additions & 1 deletion ci/install_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ brew tap homebrew/science

brew install git
brew install cmake
brew install boost
brew install libccd
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES

target_link_libraries(${PROJECT_NAME}
PUBLIC ${OCTOMAP_LIBRARIES}
PRIVATE ${CCD_LIBRARIES}
PRIVATE ${Boost_LIBRARIES})
PRIVATE ${CCD_LIBRARIES})

target_include_directories(${PROJECT_NAME} INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
Expand Down
14 changes: 1 addition & 13 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ macro(add_fcl_test test_file_name)
# Get the name (i.e. bla.cpp => bla)
get_filename_component(test_name ${ARGV} NAME_WE)
add_executable(${test_name} ${ARGV})
target_link_libraries(${test_name}
fcl
test_fcl_utility
gtest
${Boost_FILESYSTEM_LIBRARY} # Boost libraries should be removed
${Boost_SYSTEM_LIBRARY}
)
target_link_libraries(${test_name} fcl test_fcl_utility gtest)
add_test(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
endmacro(add_fcl_test)

Expand All @@ -81,12 +75,6 @@ configure_file("${TEST_RESOURCES_SRC_DIR}/config.h.in" "${TEST_RESOURCES_BIN_DIR

include_directories(.)
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
include_directories(${Boost_INCLUDE_DIR})

if(MSVC)
add_definitions(-DBOOST_ALL_NO_LIB)
endif()
add_definitions(-DBOOST_TEST_DYN_LINK)

# Build all the tests
foreach(test ${tests})
Expand Down
6 changes: 2 additions & 4 deletions test/test_fcl_collision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "fcl/narrowphase/narrowphase.h"
#include "test_fcl_utility.h"
#include "fcl_resources/config.h"
#include <boost/filesystem.hpp>

using namespace fcl;

Expand Down Expand Up @@ -241,10 +240,9 @@ GTEST_TEST(FCL_COLLISION, mesh_mesh)
{
std::vector<Vec3f> p1, p2;
std::vector<Triangle> t1, t2;
boost::filesystem::path path(TEST_RESOURCES_DIR);

loadOBJFile((path / "env.obj").string().c_str(), p1, t1);
loadOBJFile((path / "rob.obj").string().c_str(), p2, t2);
loadOBJFile(TEST_RESOURCES_DIR"/env.obj", p1, t1);
loadOBJFile(TEST_RESOURCES_DIR"/rob.obj", p2, t2);

std::vector<Transform3f> transforms;
FCL_REAL extents[] = {-3000, -3000, 0, 3000, 3000, 3000};
Expand Down
7 changes: 3 additions & 4 deletions test/test_fcl_distance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "fcl/collision_node.h"
#include "test_fcl_utility.h"
#include "fcl_resources/config.h"
#include <boost/filesystem.hpp>

using namespace fcl;

Expand Down Expand Up @@ -83,9 +82,9 @@ GTEST_TEST(FCL_DISTANCE, mesh_distance)
{
std::vector<Vec3f> p1, p2;
std::vector<Triangle> t1, t2;
boost::filesystem::path path(TEST_RESOURCES_DIR);
loadOBJFile((path / "env.obj").string().c_str(), p1, t1);
loadOBJFile((path / "rob.obj").string().c_str(), p2, t2);

loadOBJFile(TEST_RESOURCES_DIR"/env.obj", p1, t1);
loadOBJFile(TEST_RESOURCES_DIR"/rob.obj", p2, t2);

std::vector<Transform3f> transforms; // t0
FCL_REAL extents[] = {-3000, -3000, 0, 3000, 3000, 3000};
Expand Down
7 changes: 3 additions & 4 deletions test/test_fcl_frontlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include "test_fcl_utility.h"

#include "fcl_resources/config.h"
#include <boost/filesystem.hpp>

using namespace fcl;

Expand Down Expand Up @@ -71,9 +70,9 @@ GTEST_TEST(FCL_FRONT_LIST, front_list)
{
std::vector<Vec3f> p1, p2;
std::vector<Triangle> t1, t2;
boost::filesystem::path path(TEST_RESOURCES_DIR);
loadOBJFile((path / "env.obj").string().c_str(), p1, t1);
loadOBJFile((path / "rob.obj").string().c_str(), p2, t2);

loadOBJFile(TEST_RESOURCES_DIR"/env.obj", p1, t1);
loadOBJFile(TEST_RESOURCES_DIR"/rob.obj", p2, t2);

std::vector<Transform3f> transforms; // t0
std::vector<Transform3f> transforms2; // t1
Expand Down
9 changes: 4 additions & 5 deletions test/test_fcl_octomap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "fcl/math/transform.h"
#include "test_fcl_utility.h"
#include "fcl_resources/config.h"
#include <boost/filesystem.hpp>

using namespace fcl;

Expand Down Expand Up @@ -215,8 +214,8 @@ void octomap_collision_test_BVH(std::size_t n, bool exhaustive)
{
std::vector<Vec3f> p1;
std::vector<Triangle> t1;
boost::filesystem::path path(TEST_RESOURCES_DIR);
loadOBJFile((path / "env.obj").string().c_str(), p1, t1);

loadOBJFile(TEST_RESOURCES_DIR"/env.obj", p1, t1);

BVHModel<BV>* m1 = new BVHModel<BV>();
std::shared_ptr<CollisionGeometry> m1_ptr(m1);
Expand Down Expand Up @@ -281,8 +280,8 @@ void octomap_distance_test_BVH(std::size_t n)
{
std::vector<Vec3f> p1;
std::vector<Triangle> t1;
boost::filesystem::path path(TEST_RESOURCES_DIR);
loadOBJFile((path / "env.obj").string().c_str(), p1, t1);

loadOBJFile(TEST_RESOURCES_DIR"/env.obj", p1, t1);

BVHModel<BV>* m1 = new BVHModel<BV>();
std::shared_ptr<CollisionGeometry> m1_ptr(m1);
Expand Down
1 change: 0 additions & 1 deletion test/test_fcl_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "fcl/collision.h"
#include "fcl/BVH/BVH_model.h"
#include "fcl_resources/config.h"
#include <boost/filesystem.hpp>
#include <sstream>
#include "fcl/math/vec_nf.h"
#include "fcl/math/sampling.h"
Expand Down

0 comments on commit 77ad85c

Please sign in to comment.