Skip to content

Commit

Permalink
Merge pull request #154 from flexible-collision-library/templatize
Browse files Browse the repository at this point in the history
Templatize FCL for scalar type
  • Loading branch information
jslee02 authored Aug 15, 2016
2 parents 31ed2e2 + bc091ee commit 9147b50
Show file tree
Hide file tree
Showing 246 changed files with 60,947 additions and 45,394 deletions.
23 changes: 13 additions & 10 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ os: Visual Studio 2015
clone_folder: C:\projects\fcl
shallow_clone: true

# branches:
# only:
# - master
platform: x64
# build platform, i.e. Win32 (instead of x86), x64, Any CPU. This setting is optional.
platform:
- Win32
- x64

environment:
CTEST_OUTPUT_ON_FAILURE: 1
Expand All @@ -23,11 +23,15 @@ configuration:
- Release

before_build:
- cmd: if "%platform%"=="Win32" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015
- cmd: if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 Win64
- cmd: if "%platform%"=="Win32" set PROGRAM_FILES_PATH=Program Files (x86)
- cmd: if "%platform%"=="x64" set PROGRAM_FILES_PATH=Program Files
- cmd: if not exist C:\"Program Files"\libccd\lib\ccd.lib (
curl -L -o libccd-2.0.tar.gz https://github.com/danfis/libccd/archive/v2.0.tar.gz &&
cmake -E tar zxf libccd-2.0.tar.gz &&
cd libccd-2.0 &&
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE=%Configuration% . &&
cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%Configuration% . &&
cmake --build . --target install --config %Configuration% &&
cd ..
) else (echo Using cached libccd)
Expand All @@ -37,19 +41,18 @@ before_build:
cd eigen-eigen-dc6cfdf9bcec &&
mkdir build &&
cd build &&
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE=%Configuration% .. &&
cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%Configuration% .. &&
cmake --build . --target install --config %Configuration% &&
cd ..\..
) else (echo Using cached Eigen3)
- cmd: set
- cmd: mkdir build
- cmd: cd build
- 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" -DEIGEN3_INCLUDE_DIR="C:\Program Files\Eigen\include\eigen3" ..
- cmd: cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%Configuration% -DCCD_INCLUDE_DIRS="C:\%PROGRAM_FILES_PATH%\libccd\include" -DCCD_LIBRARY="C:\%PROGRAM_FILES_PATH%\libccd\lib\ccd.lib" -DEIGEN3_INCLUDE_DIR="C:\%PROGRAM_FILES_PATH%\Eigen\include\eigen3" ..

build:
project: C:\projects\fcl\build\fcl.sln
parallel: true

# tests seem to hang
# test_script:
# - cmd: ctest -C %Configuration%
test_script:
- cmd: ctest -C %Configuration%
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ matrix:
- os: osx
compiler: gcc

addons:
apt:
packages:
- libboost-all-dev

install:
# Install dependencies for FCL
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then 'ci/install_linux.sh' ; fi
Expand All @@ -41,7 +36,7 @@ script:
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFCL_COVERALLS=$COVERALLS ..

# Build
- make -j4
- make -j2
- if [ $COVERALLS = ON ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then make coveralls; fi

# Run unit tests
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

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

* Switched to Eigen for math operations: [#150](https://github.com/flexible-collision-library/fcl/pull/150), [#96](https://github.com/flexible-collision-library/fcl/issues/96)
* Added missing copyright headers: [#149](https://github.com/flexible-collision-library/fcl/pull/149)
* Enabled build with SSE option by default: [#159](https://github.com/flexible-collision-library/fcl/pull/159)
* Switched to Eigen for math operations: [#150](https://github.com/flexible-collision-library/fcl/pull/150), [#96](https://github.com/flexible-collision-library/fcl/issues/96)
* Fixed redundant pair checking of SpatialHashingCollisionManager: [#156](https://github.com/flexible-collision-library/fcl/pull/156)
* 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
25 changes: 6 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,12 @@ endif()

project(fcl CXX C)

option(FCL_ENABLE_PROFILING "Enable profiling" OFF)
option(FCL_TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF)

# set the default build type
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

# Set build type variable
set(FCL_BUILD_TYPE_RELEASE FALSE)
set(FCL_BUILD_TYPE_DEBUG FALSE)

string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPERCASE)
if("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "RELEASE")
set(FCL_BUILD_TYPE_RELEASE TRUE)
elseif("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "DEBUG")
set(FCL_BUILD_TYPE_DEBUG TRUE)
else()
message(STATUS "CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} unknown. Valid options are: Debug Release")
if (NOT MSVC AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

# This shouldn't be necessary, but there has been trouble
Expand All @@ -48,14 +36,13 @@ else()
endif()

# Whether to enable SSE
option(FCL_USE_SSE "Whether FCL should SSE instructions" OFF)
set(FCL_HAVE_SSE 0)
option(FCL_USE_SSE "Whether FCL should SSE instructions" ON)
if(FCL_USE_SSE)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(FCL_HAVE_SSE 0) #always disable, for now
add_definitions(-march=native)
elseif(MSVC)
add_definitions(/arch:SSE2)
endif()
# TODO: do something similar for other compilers
endif()

# Coveralls support
Expand Down
4 changes: 2 additions & 2 deletions CMakeModules/CompilerSettings.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GCC
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-std=c++11 -W -Wall -g -Wextra -Wno-missing-field-initializers -Wno-unused-parameter)
add_definitions(-std=c++11 -W -Wall -g -Wextra -Wpedantic -Wno-missing-field-initializers -Wno-unused-parameter)
if(FCL_TREAT_WARNINGS_AS_ERRORS)
add_definitions(-Werror)
endif(FCL_TREAT_WARNINGS_AS_ERRORS)
Expand All @@ -16,7 +16,7 @@ endif()

# Visual Studio
if(MSVC OR MSVC90 OR MSVC10)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /MP /W1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /MP /W1 /bigobj")
if(FCL_TREAT_WARNINGS_AS_ERRORS)
add_definitions(/WX)
endif(FCL_TREAT_WARNINGS_AS_ERRORS)
Expand Down
10 changes: 10 additions & 0 deletions ci/install_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ brew install git
brew install cmake
brew install eigen
brew install libccd

# Octomap
git clone https://github.com/OctoMap/octomap
cd octomap
git checkout tags/v1.8.0
mkdir build
cd build
cmake ..
make
sudo make install
Loading

0 comments on commit 9147b50

Please sign in to comment.