Skip to content

How to inherit 'defines' from other targets? #363

@brooksbp

Description

@brooksbp

I'd like to do the following:

cc_library(
  name = "libA",
  srcs = ["libA.cc"],
  defines = ["MY_DEFINE"],
)

cc_binary(
  name = "binX",
  srcs = ["binX.cc"],
  deps = [":libA"],  # This will inherit libA's defines such that binX is compiled with -DMY_DEFINE
)

Is this possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions