Skip to content

Commit

Permalink
Use yaml_cpp from OS (RobotLocomotion#7352)
Browse files Browse the repository at this point in the history
* Use yaml_cpp from Ubuntu Xenial or Homebrew.  This removes the bazel external yaml_cpp and replaces it with system yaml_cpp found via pkg-config.

* Exclude yaml_util.h header from install.

* Add yaml-cpp link flag to installed libdrake.so.  This may only be a temporary measure pending maturity of the pc2cps module.
  • Loading branch information
nuclearsandwich authored and jwnimmer-tri committed Nov 3, 2017
1 parent 74a2c40 commit 9eb22d4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 95 deletions.
8 changes: 3 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,10 @@ github_archive(
build_file = "tools/workspace/tinyobjloader/tinyobjloader.BUILD.bazel",
)

github_archive(
pkg_config_package(
name = "yaml_cpp",
repository = "jbeder/yaml-cpp",
commit = "85af926ddc5f3c8fb438001743e65ec3a039ceec",
sha256 = "907fb42a502e1448a73959f9a648771b070d6d8513f16d74149f775fc56550ef", # noqa
build_file = "tools/workspace/yaml_cpp/yaml_cpp.BUILD.bazel",
atleast_version = "0.5.2",
modname = "yaml-cpp",
)

load("//tools/workspace/buildifier:buildifier.bzl", "buildifier_repository")
Expand Down
6 changes: 6 additions & 0 deletions tools/install/libdrake/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ install(
name = "install",
targets = ["libdrake.so"],
guess_hdrs = "WORKSPACE",
guess_hdrs_exclude = [
# This is private visibility; we don't want to have a yaml dependency
# in our published headers. TODO(jwnimmer-tri) Update the guess_hdrs
# logic to exclude non-public headers by default.
"drake/systems/controllers/yaml_util.h",
],
allowed_externals = ["//:LICENSE.TXT"], # Root for our #include paths.
deps = [
":install_cmake_config",
Expand Down
14 changes: 6 additions & 8 deletions tools/install/libdrake/drake.cps
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@
],
"X-CMake-Find-Args": ["CONFIG"]
},
"yaml-cpp": {
"Version": "0.5.5",
"Hints": ["@prefix@/lib/cmake/yaml-cpp"],
"X-CMake-Find-Args": ["CONFIG"]
},
"ZLIB": {
"Version": "1.2.5",
"X-CMake-Find-Args": ["MODULE"]
Expand All @@ -101,7 +96,11 @@
"@prefix@/include"
],
"Compile-Features": ["c++14"],
"Link-Flags": ["-lnlopt", "-ltinyxml2"],
"Link-Flags": [
"-lnlopt",
"-ltinyxml2",
"-lyaml-cpp"
],
"Link-Requires": [
"fmt:fmt",
"SDFormat:sdformat",
Expand All @@ -128,8 +127,7 @@
"protobuf:protobuf",
"robotlocomotion-lcmtypes:robotlocomotion-lcmtypes-cpp",
"spdlog:spdlog",
"stx:stx",
"yaml-cpp:yaml-cpp"
"stx:stx"
]
},
"drake-lcmtypes-cpp": {
Expand Down
1 change: 0 additions & 1 deletion tools/workspace/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ _DRAKE_EXTERNAL_PACKAGE_INSTALLS = ["@%s//:install" % p for p in [
"tinydir",
"tinyobjloader",
"vtk",
"yaml_cpp",
]] + ["//tools/workspace/%s:install" % p for p in [
"gflags",
"jchart2d",
Expand Down
10 changes: 0 additions & 10 deletions tools/workspace/yaml_cpp/BUILD.bazel

This file was deleted.

25 changes: 0 additions & 25 deletions tools/workspace/yaml_cpp/yaml_cpp-create-cps.py

This file was deleted.

46 changes: 0 additions & 46 deletions tools/workspace/yaml_cpp/yaml_cpp.BUILD.bazel

This file was deleted.

0 comments on commit 9eb22d4

Please sign in to comment.