Skip to content

Commit

Permalink
Merge pull request #18611 from jwnimmer-tri/fcl-internal
Browse files Browse the repository at this point in the history
[workspace] Deprecate the ccd and fcl externals
  • Loading branch information
jwnimmer-tri authored Jan 19, 2023
2 parents 50d0c07 + 1dbf949 commit ba2dd13
Show file tree
Hide file tree
Showing 14 changed files with 277 additions and 31 deletions.
4 changes: 2 additions & 2 deletions geometry/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ drake_cc_library(
"//geometry/proximity:hydroelastic_callback",
"//geometry/proximity:obj_to_surface_mesh",
"//geometry/proximity:penetration_as_point_pair_callback",
"@fcl",
"@fcl_internal//:fcl",
"@fmt",
],
)
Expand Down Expand Up @@ -668,7 +668,7 @@ drake_cc_googletest(
"//geometry/proximity:hydroelastic_callback",
"//geometry/proximity:make_sphere_mesh",
"//math",
"@fcl",
"@fcl_internal//:fcl",
],
)

Expand Down
14 changes: 7 additions & 7 deletions geometry/proximity/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ drake_cc_library(
":collision_filter",
":proximity_utilities",
"//geometry:geometry_ids",
"@fcl",
"@fcl_internal//:fcl",
],
)

Expand Down Expand Up @@ -234,7 +234,7 @@ drake_cc_library(
"//geometry:geometry_ids",
"//geometry/query_results:signed_distance_to_point",
"//math:geometric_transform",
"@fcl",
"@fcl_internal//:fcl",
],
)

Expand Down Expand Up @@ -285,7 +285,7 @@ drake_cc_library(
":collision_filter",
":proximity_utilities",
"//common:sorted_pair",
"@fcl",
"@fcl_internal//:fcl",
"@fmt",
],
)
Expand All @@ -312,7 +312,7 @@ drake_cc_library(
"//geometry:proximity_properties",
"//geometry/query_results:contact_surface",
"//math:geometric_transform",
"@fcl",
"@fcl_internal//:fcl",
"@fmt",
],
)
Expand Down Expand Up @@ -683,7 +683,7 @@ drake_cc_library(
"//common:nice_type_name",
"//geometry/query_results:penetration_as_point_pair",
"//geometry/query_results:signed_distance_to_point",
"@fcl",
"@fcl_internal//:fcl",
],
)

Expand Down Expand Up @@ -734,7 +734,7 @@ drake_cc_library(
"//common:sorted_pair",
"//geometry:geometry_ids",
"//geometry:shape_specification",
"@fcl",
"@fcl_internal//:fcl",
"@fmt",
],
)
Expand Down Expand Up @@ -870,7 +870,7 @@ drake_cc_library(
"//geometry:utilities",
"//geometry/proximity:proximity_utilities",
"//math:geometric_transform",
"@fcl",
"@fcl_internal//:fcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion tools/install/check_licenses.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@drake//tools/install:install.bzl", "InstallInfo")

# List of exact file names of license files
LICENSE_LITERALS = [
"BSD-LICENSE", # @ccd
"BSD-LICENSE", # @ccd_internal
"COPYING",
"Copyright.txt", # @vtk
"EULA.pdf", # @gurobi
Expand Down
4 changes: 2 additions & 2 deletions tools/workspace/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ drake_py_binary(
)

_DRAKE_EXTERNAL_PACKAGE_INSTALLS = ["@%s//:install" % p for p in [
"ccd",
"ccd_internal",
"com_jidesoft_jide_oss",
"common_robotics_utilities",
"commons_io",
"curl_internal",
"fcl",
"fcl_internal",
"fmt",
"gz_math_internal",
"gz_utils_internal",
Expand Down
10 changes: 1 addition & 9 deletions tools/workspace/ccd/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ load(
"@drake//tools/workspace:cmake_configure_file.bzl",
"cmake_configure_file",
)
load(
"@drake//tools/install:install.bzl",
"install",
)

licenses(["notice"]) # BSD-3-Clause

Expand Down Expand Up @@ -58,9 +54,5 @@ cc_library(
defines = ["CCD_STATIC_DEFINE"],
includes = ["src"],
linkstatic = 1,
)

install(
name = "install",
docs = ["BSD-LICENSE"],
deprecation = "DRAKE DEPRECATED: The @ccd external is deprecated. The deprecated code will be removed from Drake on or after 2023-05-01.", # noqa,
)
5 changes: 5 additions & 0 deletions tools/workspace/ccd_internal/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- python -*-

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

add_lint_tests()
66 changes: 66 additions & 0 deletions tools/workspace/ccd_internal/package.BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# -*- python -*-

load(
"@drake//tools/workspace:cmake_configure_file.bzl",
"cmake_configure_file",
)
load(
"@drake//tools/install:install.bzl",
"install",
)

licenses(["notice"]) # BSD-3-Clause

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

# Generates config.h based on the defines= we want in Drake.
cmake_configure_file(
name = "config",
src = "src/ccd/config.h.cmake.in",
out = "src/ccd/config.h",
defines = ["CCD_DOUBLE"],
visibility = ["//visibility:private"],
)

# Guessing headers with
# install(...
# guess_hdrs = "PACKAGE",
# )
# fails and lists internal headers in addition to the public headers.
CCD_PUBLIC_HEADERS = [
"src/ccd/ccd.h",
"src/ccd/config.h",
"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
# sources instead of globbing, but conveniently puts the public headers in one
# place and private sources and headers in another; we'll use globbing here.
cc_library(
name = "ccd",
srcs = glob([
"src/*.c",
"src/*.h",
]),
hdrs = CCD_PUBLIC_HEADERS,
copts = CCD_COPTS,
defines = ["CCD_STATIC_DEFINE"],
includes = ["src"],
linkstatic = 1,
)

install(
name = "install",
docs = ["BSD-LICENSE"],
)
15 changes: 15 additions & 0 deletions tools/workspace/ccd_internal/repository.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- python -*-

load("@drake//tools/workspace:github.bzl", "github_archive")

def ccd_internal_repository(
name,
mirrors = None):
github_archive(
name = name,
repository = "danfis/libccd",
commit = "7931e764a19ef6b21b443376c699bbc9c6d4fba8",
sha256 = "479994a86d32e2effcaad64204142000ee6b6b291fd1859ac6710aee8d00a482", # noqa
build_file = ":package.BUILD.bazel",
mirrors = mirrors,
)
8 changes: 7 additions & 1 deletion tools/workspace/default.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ load("@drake//tools/workspace/blas:repository.bzl", "blas_repository")
load("@drake//tools/workspace/buildifier:repository.bzl", "buildifier_repository") # noqa
load("@drake//tools/workspace/cc:repository.bzl", "cc_repository")
load("@drake//tools/workspace/ccd:repository.bzl", "ccd_repository")
load("@drake//tools/workspace/ccd_internal:repository.bzl", "ccd_internal_repository") # noqa
load("@drake//tools/workspace/cds:repository.bzl", "cds_repository")
load("@drake//tools/workspace/clang_cindex_python3_internal:repository.bzl", "clang_cindex_python3_internal_repository") # noqa
load("@drake//tools/workspace/clp:repository.bzl", "clp_repository")
Expand All @@ -24,7 +25,8 @@ load("@drake//tools/workspace/drake_visualizer:repository.bzl", "drake_visualize
load("@drake//tools/workspace/dreal:repository.bzl", "dreal_repository")
load("@drake//tools/workspace/eigen:repository.bzl", "eigen_repository")
load("@drake//tools/workspace/expat:repository.bzl", "expat_repository")
load("@drake//tools/workspace/fcl:repository.bzl", "fcl_repository")
load("@drake//tools/workspace/fcl:repository.bzl", "fcl_repository") # noqa
load("@drake//tools/workspace/fcl_internal:repository.bzl", "fcl_internal_repository") # noqa
load("@drake//tools/workspace/fmt:repository.bzl", "fmt_repository")
load("@drake//tools/workspace/gflags:repository.bzl", "gflags_repository")
load("@drake//tools/workspace/gfortran:repository.bzl", "gfortran_repository")
Expand Down Expand Up @@ -126,6 +128,8 @@ def add_default_repositories(excludes = [], mirrors = DEFAULT_MIRRORS):
cc_repository(name = "cc")
if "ccd" not in excludes:
ccd_repository(name = "ccd", mirrors = mirrors)
if "ccd_internal" not in excludes:
ccd_internal_repository(name = "ccd_internal", mirrors = mirrors)
if "cds" not in excludes:
# N.B. This repository is deprecated for removal on 2023-02-01.
# For details see https://github.com/RobotLocomotion/drake/pull/18156.
Expand Down Expand Up @@ -166,6 +170,8 @@ def add_default_repositories(excludes = [], mirrors = DEFAULT_MIRRORS):
expat_repository(name = "expat")
if "fcl" not in excludes:
fcl_repository(name = "fcl", mirrors = mirrors)
if "fcl_internal" not in excludes:
fcl_internal_repository(name = "fcl_internal", mirrors = mirrors)
if "fmt" not in excludes:
fmt_repository(name = "fmt", mirrors = mirrors)
if "gflags" not in excludes:
Expand Down
10 changes: 1 addition & 9 deletions tools/workspace/fcl/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ load(
"@drake//tools/workspace:cmake_configure_file.bzl",
"cmake_configure_file",
)
load(
"@drake//tools/install:install.bzl",
"install",
)
load(
"@drake//tools/workspace:generate_export_header.bzl",
"generate_export_header",
Expand Down Expand Up @@ -136,9 +132,5 @@ cc_library(
"@ccd",
"@eigen",
],
)

install(
name = "install",
docs = ["LICENSE"],
deprecation = "DRAKE DEPRECATED: The @fcl external is deprecated. The deprecated code will be removed from Drake on or after 2023-05-01.", # noqa,
)
7 changes: 7 additions & 0 deletions tools/workspace/fcl_internal/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- python -*-

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

exports_files(["version-from-xml.sed"])

add_lint_tests()
Loading

0 comments on commit ba2dd13

Please sign in to comment.