Skip to content

Commit

Permalink
Revert "Add drake_cc_package_library and library_lint"
Browse files Browse the repository at this point in the history
This reverts commit f942383.
  • Loading branch information
jwnimmer-tri committed Apr 17, 2018
1 parent a57e772 commit cd3dc22
Show file tree
Hide file tree
Showing 41 changed files with 110 additions and 598 deletions.
17 changes: 2 additions & 15 deletions automotive/maliput/api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
)
load("//tools:drake.bzl", "drake_cc_googletest", "drake_cc_library")
load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
name = "api",
deps = [
":everything",
],
)

drake_cc_library(
name = "everything",
name = "api",
srcs = [
"lane.cc",
"lane_data.cc",
Expand All @@ -37,7 +25,6 @@ drake_cc_library(
"segment.h",
"type_specific_identifier.h",
],
visibility = ["//visibility:private"],
deps = [
"//common:default_scalars",
"//common:essential",
Expand Down
10 changes: 3 additions & 7 deletions automotive/maliput/api/test_utilities/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"drake_cc_library",
"drake_cc_package_library",
)
load("//tools:drake.bzl", "drake_cc_library")
load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
# This should encompass every cc_library in this package.
drake_cc_library(
name = "test_utilities",
testonly = 1,
deps = [
":maliput_types_compare",
":rules_test_utilities",
],
)

Expand Down
13 changes: 2 additions & 11 deletions automotive/maliput/dragway/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"//tools:drake.bzl",
"drake_cc_binary",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
)
load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
name = "dragway",
deps = [
":everything",
],
)

drake_cc_library(
name = "everything",
name = "dragway",
srcs = [
"branch_point.cc",
"junction.cc",
Expand All @@ -34,7 +26,6 @@ drake_cc_library(
"road_geometry.h",
"segment.h",
],
visibility = ["//visibility:private"],
deps = [
"//automotive/maliput/api",
"//common:essential",
Expand Down
7 changes: 4 additions & 3 deletions automotive/maliput/monolane/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"//tools:drake.bzl",
"drake_cc_binary",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
)
load(
"@drake//tools/skylark:drake_py.bzl",
Expand All @@ -15,8 +14,10 @@ load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
drake_cc_library(
name = "monolane",
srcs = [],
hdrs = [],
deps = [
":builder",
":lanes",
Expand Down
7 changes: 4 additions & 3 deletions automotive/maliput/multilane/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"//tools:drake.bzl",
"drake_cc_binary",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
)
load(
"@drake//tools/skylark:drake_py.bzl",
Expand All @@ -15,8 +14,10 @@ load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
drake_cc_library(
name = "multilane",
srcs = [],
hdrs = [],
deps = [
":builder",
":lanes",
Expand Down
9 changes: 3 additions & 6 deletions automotive/maliput/multilane/test_utilities/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# -*- python -*-
# This file contains rules for Bazel; see drake/doc/bazel.rst.

load(
"@drake//tools/skylark:drake_cc.bzl",
"drake_cc_library",
"drake_cc_package_library",
)
load("//tools:drake.bzl", "drake_cc_library")
load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
# This should encompass every cc_library in this package.
drake_cc_library(
name = "test_utilities",
testonly = 1,
deps = [
Expand Down
7 changes: 4 additions & 3 deletions automotive/maliput/rndf/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"//tools:drake.bzl",
"drake_cc_binary",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
)
load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
drake_cc_library(
name = "rndf",
srcs = [],
hdrs = [],
deps = [
":builder",
":lanes",
Expand Down
9 changes: 3 additions & 6 deletions automotive/maliput/rndf/test_utilities/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"drake_cc_library",
"drake_cc_package_library",
)
load("//tools:drake.bzl", "drake_cc_library")
load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
# This should encompass every cc_library in this package.
drake_cc_library(
name = "test_utilities",
testonly = 1,
deps = [
Expand Down
7 changes: 4 additions & 3 deletions automotive/maliput/simplerulebook/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"//tools:drake.bzl",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
)
load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
drake_cc_library(
name = "simplerulebook",
srcs = [],
hdrs = [],
deps = [
":simple_rulebook",
":yaml_io",
Expand Down
15 changes: 3 additions & 12 deletions automotive/maliput/utility/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"drake_cc_binary",
"//tools:drake.bzl",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
"drake_cc_binary",
)
load(
"@drake//tools/skylark:drake_py.bzl",
Expand All @@ -15,15 +14,8 @@ load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
name = "utility",
deps = [
":everything",
],
)

drake_cc_library(
name = "everything",
name = "utility",
srcs = [
"generate_obj.cc",
"generate_urdf.cc",
Expand All @@ -32,7 +24,6 @@ drake_cc_library(
"generate_obj.h",
"generate_urdf.h",
],
visibility = ["//visibility:private"],
deps = [
"//automotive/maliput/api",
"//math:geometric_transform",
Expand Down
22 changes: 8 additions & 14 deletions common/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"//tools:drake.bzl",
"drake_cc_binary",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
)
load(
"@drake//tools/skylark:drake_py.bzl",
Expand All @@ -17,8 +16,11 @@ load("//tools/lint:lint.bzl", "add_lint_tests")

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

drake_cc_package_library(
# This should encompass every non-testonly cc_library in this package,
# except for items that should only ever be linked into main() programs.
drake_cc_library(
name = "common",
srcs = [],
deps = [
":autodiff",
":autodiffxd_make_coherent",
Expand Down Expand Up @@ -50,6 +52,9 @@ drake_cc_package_library(
":type_safe_index",
":unused",
],
# Intentionally excluded items:
# - text_logging_gflags
# - text_logging_gflags_h
)

# A library of things that EVERYONE should want and MUST EAT.
Expand Down Expand Up @@ -374,11 +379,6 @@ drake_cc_library(
"//tools/cc_toolchain:linux": ["-pthread"],
"//conditions:default": [],
}),
tags = [
# Don't add this library into the ":common" package library.
# Only programs with a main() function should ever use this header.
"exclude_from_package",
],
deps = [
":essential",
"@gflags",
Expand All @@ -391,12 +391,6 @@ drake_cc_library(
drake_cc_library(
name = "text_logging_gflags_h",
hdrs = ["text_logging_gflags.h"],
tags = [
# Don't add this library into the ":common" package library.
# This rule should only be used for install purposes.
"exclude_from_package",
],
# This rule should only be used for install purposes.
visibility = ["//tools/install/libdrake:__pkg__"],
)

Expand Down
16 changes: 8 additions & 8 deletions common/test_utilities/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# -*- python -*-

load(
"@drake//tools/skylark:drake_cc.bzl",
"//tools:drake.bzl",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
)
load(
"@drake//tools/skylark:drake_py.bzl",
Expand All @@ -20,9 +19,11 @@ exports_files([

# This should encompass every cc_library in this package, except for items that
# should only ever be linked into main() programs.
drake_cc_package_library(
drake_cc_library(
name = "test_utilities",
testonly = 1,
srcs = [],
hdrs = [],
deps = [
":eigen_geometry_compare",
":eigen_matrix_compare",
Expand All @@ -33,6 +34,8 @@ drake_cc_package_library(
":random_polynomial_matrix",
":symbolic_test_util",
],
# Intentionally excluded items:
# - drake_cc_googletest_main
)

drake_cc_library(
Expand Down Expand Up @@ -102,15 +105,12 @@ drake_cc_library(
],
)

# This is only intended to be used by the drake_cc_googletest() macro.
# Do not add it to ":test_utilities".
drake_cc_library(
name = "drake_cc_googletest_main",
testonly = 1,
srcs = ["drake_cc_googletest_main.cc"],
tags = [
# This is only intended to be used by the drake_cc_googletest() macro.
# Don't add this library into the ":test_utilities" package library.
"exclude_from_package",
],
deps = [
"//common:text_logging_gflags",
"@gtest//:without_main",
Expand Down
3 changes: 2 additions & 1 deletion examples/rod2d/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ drake_cc_library(
":rod2d_state_vector",
"//common:essential",
"//multibody/constraint",
"//multibody/constraint:constraint_solver",
"//solvers:mathematical_program",
"//systems/framework:leaf_system",
"//systems/rendering:pose_vector",
Expand All @@ -65,7 +66,7 @@ drake_cc_googletest(
":rod2d",
"//common:essential",
"//common/test_utilities:eigen_matrix_compare",
"//multibody/constraint",
"//multibody/constraint:constraint_solver",
"//systems/analysis",
],
)
Expand Down
Loading

0 comments on commit cd3dc22

Please sign in to comment.