Is it possible for a cxx_library to export preprocessor macros?

344 views Asked by At

I am using to build some C++ code. I have a library (not my own!) that sets some preprocessor macro that are required by another library (not my own!).

Does Buck provide a way for modules to export preprocessor macros?

For example, library A contains a header file that sets MY_MACRO; library B depends on library A and has some code that requires MY_MACRO to be set.

1

There are 1 answers

0
sdwilsh On

With your cxx_library, add an exported_headers containing the .h files that contain your macros. This will then be made available to dependent libraries.