In the `BUCK` file, any difference between these two options:
Julio C. Villasante
1

glob is used to generate a list of all files that match the pattern from the BUCK file.

subdir_glob is used to generate a dictionary. The values are the path to each file from the BUCK file. The keys are the path to each file from the left-hand-side of the pair. You can think of subdir_glob like a cd followed by a glob.

For example:

.
└── my-library
├── BUCK
├── include
│ └── detail
│ └── a.hpp
│ └── b.hpp
├── private
│ └── c.hpp
└── src
└── a.cpp

The following…

subdir_glob([
('include', '**/*.hpp'),
])

Would give…

{
'detail/a.hpp': 'include/detail/a.hpp',
'b.hpp': 'include/b.hpp'
}

You can add a print to your BUCK file for debugging.

headers and exported_headers can accept a list or a dictionary. I prefer the dictionary approach because #include <library/header.hpp> is much cleaner than #include <library/include/header.hpp>.

To get Clang completion working in your example, you need to add mathutils/include to the include path. It would definitely be possible to build tooling that reads the Buck targets for code-completion automatically!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.