Skip to content

Commit

Permalink
Update versions of ccd, fcl, and octomap; avoid installation; and hid…
Browse files Browse the repository at this point in the history
…e binary symbols (#7417)
  • Loading branch information
j-rivero authored and jamiesnape committed Jan 11, 2018
1 parent c5069c5 commit e4f535c
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 242 deletions.
12 changes: 6 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -216,24 +216,24 @@ github_archive(
github_archive(
name = "ccd",
repository = "danfis/libccd",
commit = "v2.0",
sha256 = "1b4997e361c79262cf1fe5e1a3bf0789c9447d60b8ae2c1f945693ad574f9471", # noqa
commit = "5677d384315d64c41a9e1dabe6a531f10ffbb7fb",
sha256 = "3b37ef4555d087f7abb6aa59c3b5cecb96410ea10e95a086ef2771569fb6fdfb", # noqa
build_file = "tools/workspace/ccd/ccd.BUILD.bazel",
)

github_archive(
name = "octomap",
repository = "OctoMap/octomap",
commit = "v1.7.2",
sha256 = "fe55efbb9ebf2b3388860e54b1c8a53d23e5a05de5956c043278013e01066c34", # noqa
commit = "v1.8.1",
sha256 = "8b18ef7693e87f1400b9a8bc41f86e3b28259ac98c0b458037232652380aa6af", # noqa
build_file = "tools/workspace/octomap/octomap.BUILD.bazel",
)

github_archive(
name = "fcl",
repository = "flexible-collision-library/fcl",
commit = "06d48b3b6f3605b8caf119d5208d8156eb64fe0d",
sha256 = "da86ed593a908d075657a305abec1670b895278a99ba76632b7afb6e678a9978", # noqa
commit = "43048336c34a01156dc216e8534ffb2788675ddf",
sha256 = "fd74916b92ed58e77c06097dc18f545462417daa8c96fa8ea2a5c81cd3205917", # noqa
build_file = "tools/workspace/fcl/fcl.BUILD.bazel",
)

Expand Down
7 changes: 0 additions & 7 deletions multibody/collision/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@ drake_cc_googletest(
],
)

drake_cc_googletest(
name = "fcl_model_test",
deps = [
":fcl_collision",
],
)

drake_cc_googletest(
name = "collision_filter_group_test",
data = [":test_models"],
Expand Down
45 changes: 0 additions & 45 deletions multibody/collision/test/fcl_model_test.cc

This file was deleted.

6 changes: 0 additions & 6 deletions tools/install/libdrake/drake.cps
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
"Hints": ["@prefix@/lib/cmake/eigen3"],
"X-CMake-Find-Args": ["CONFIG"]
},
"fcl": {
"Version": "0.6.0",
"Hints": ["@prefix@/lib/cmake/fcl"],
"X-CMake-Find-Args": ["CONFIG"]
},
"fmt": {
"Version": "3.0.1",
"Hints": ["@prefix@/lib/cmake/fmt"],
Expand Down Expand Up @@ -101,7 +96,6 @@
"bot2-core-lcmtypes:lcmtypes_bot2-core-cpp",
"Bullet:BulletCollision",
"Eigen3:Eigen",
"fcl:fcl",
"ignition-math4:ignition-math4",
"ignition-rndf0:ignition-rndf0",
"lcm:lcm",
Expand Down
5 changes: 0 additions & 5 deletions tools/workspace/ccd/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@

load("//tools/lint:lint.bzl", "add_lint_tests")

exports_files(
["ccd-create-cps.py"],
visibility = ["@ccd//:__pkg__"],
)

add_lint_tests()
25 changes: 0 additions & 25 deletions tools/workspace/ccd/ccd-create-cps.py

This file was deleted.

26 changes: 10 additions & 16 deletions tools/workspace/ccd/ccd.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ load(
)
load(
"@drake//tools/install:install.bzl",
"cmake_config",
"install",
"install_cmake_config",
)

package(
Expand All @@ -35,6 +33,13 @@ CCD_PUBLIC_HEADERS = [
"src/ccd/compiler.h",
"src/ccd/quat.h",
"src/ccd/vec3.h",
"src/ccd/ccd_export.h",
]

# Options used when building the ccd code. Handled by cmake in upstream code
CCD_COPTS = [
"-Wno-all",
"-fvisibility=hidden",
]

# Generates the library exported to users. Upstream's CMake code lists out all
Expand All @@ -47,24 +52,13 @@ cc_library(
"src/*.h",
]),
hdrs = CCD_PUBLIC_HEADERS,
copts = ["-Wno-all"],
copts = CCD_COPTS,
defines = ["CCD_STATIC_DEFINE"],
includes = ["src"],
linkstatic = 1,
)

cmake_config(
package = "ccd",
script = "@drake//tools/workspace/ccd:ccd-create-cps.py",
version_file = "CMakeLists.txt",
)

install_cmake_config(package = "ccd") # Creates rule :install_cmake_config.

install(
name = "install",
targets = [":ccd"],
hdrs = CCD_PUBLIC_HEADERS,
hdr_dest = "include/ccd",
hdr_strip_prefix = ["**/"],
docs = ["BSD-LICENSE"],
deps = [":install_cmake_config"],
)
5 changes: 0 additions & 5 deletions tools/workspace/fcl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@

load("//tools/lint:lint.bzl", "add_lint_tests")

exports_files(
["fcl-create-cps.py"],
visibility = ["@fcl//:__pkg__"],
)

add_lint_tests()
44 changes: 0 additions & 44 deletions tools/workspace/fcl/fcl-create-cps.py

This file was deleted.

48 changes: 24 additions & 24 deletions tools/workspace/fcl/fcl.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,30 @@ load(
"@drake//tools/workspace:cmake_configure_file.bzl",
"cmake_configure_file",
)
load(
"@drake//tools/workspace:generate_include_header.bzl",
"drake_generate_include_header",
)
load(
"@drake//tools/install:install.bzl",
"cmake_config",
"install",
"install_cmake_config",
)
load(
"@drake//tools/workspace:generate_export_header.bzl",
"generate_export_header",
)
load(
"@drake//tools/workspace:generate_include_header.bzl",
"drake_generate_include_header",
)

package(
default_visibility = ["//visibility:public"],
)

# Generate header to provide ABI export symbols for fcl.
generate_export_header(
out = "include/fcl/export.h",
lib = "fcl",
static_define = "FCL_STATIC_DEFINE",
)

# Generates config.h based on the version numbers in CMake code.
cmake_configure_file(
name = "config",
Expand All @@ -42,40 +51,31 @@ drake_generate_include_header(
)

# The globbed srcs= and hdrs= matches upstream's explicit globs of the same.
# fcl/export.h is a generated file so it is not automatically included by
# the hdrs glob expression
cc_library(
name = "fcl",
srcs = glob(["src/**/*.cpp"]),
hdrs = glob(["include/**/*.h"]) + [
":config",
":fcl_h_genrule",
"include/fcl/export.h",
],
copts = ["-fvisibility=hidden"],
defines = [
"FCL_STATIC_DEFINE",
"FCL_HAVE_OCTOMAP",
],
includes = ["include"],
linkstatic = 1,
deps = [
"@ccd",
"@eigen",
"@octomap",
],
)

cmake_config(
package = "fcl",
script = "@drake//tools/workspace/fcl:fcl-create-cps.py",
version_file = "CMakeModules/FCLVersion.cmake",
deps = [
"@ccd//:cps",
"@eigen//:cps",
"@octomap//:cps",
],
)

install_cmake_config(package = "fcl") # Creates rule :install_cmake_config.

install(
name = "install",
targets = [":fcl"],
hdr_dest = "include/fcl",
hdr_strip_prefix = ["include/fcl"],
guess_hdrs = "PACKAGE",
docs = ["LICENSE"],
deps = [":install_cmake_config"],
)
Loading

0 comments on commit e4f535c

Please sign in to comment.