Add the ability to request CMake to ignore paths #2873
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change(s)
A common frustration when building USD is that the dependencies (especially OpenImageIO, Ptex, Alembic) eagerly pick up things that are used in the users homebrew directory on macOS. This can cause issues if you're trying to build multi-arch (brew is single arch) and also if you hope to make your distribution distributable with other users.
This change adds a generic multi-arg flag that allows builders to say what paths to ignore.
On Apple Silicon Macs, I also add the option to specifically ignore homebrew. I chose not to add this for Intel Macs because homebrew installs to
/usr/local
on those machines, and that directory may include other useful libs. If an intel user did want to exclude it, they could still pass it to the ignore-paths flag.This PR is mostly taking Lee Kerley's work for our internal fork and applying it more generically for OpenUSD.