Export 3rdparty_tbb when using a system TBB - #7575
Open
Tobias-Fischer wants to merge 1 commit into
Open
Tobias-Fischer wants to merge 1 commit into
Tobias-Fischer wants to merge 1 commit into
Conversation
open3d_find_package_3rdparty_library() only adds a target to the install export set when it is declared PUBLIC. The USE_SYSTEM_TBB branch omits PUBLIC, so configuring with -DUSE_SYSTEM_TBB=ON fails: Target "Open3D" INTERFACE_LINK_LIBRARIES property contains path ... which is prefixed in the source directory install(EXPORT "Open3DTargets" ...) includes target "Open3D" which requires target "3rdparty_tbb" that is not in any export set. TBB appears in Open3D's public interface -- utility::ProgressBar uses it in installed headers -- so the target has to be exported. The OPEN3D_USE_ONEAPI_PACKAGES branch a little further up already declares the equivalent target PUBLIC, so this just brings the two into line. Found while packaging Open3D for conda-forge, where this has been carried as a patch by Tobias Fischer (@Tobias-Fischer). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017R4DS6whKCY8xGcA61kni2
|
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type
Motivation and Context
Configuring with
-DUSE_SYSTEM_TBB=ONfails at install-export generation:open3d_find_package_3rdparty_library()only adds a target to the install export set when it is declaredPUBLIC, and theUSE_SYSTEM_TBBbranch omits it. TBB is part of Open3D's public interface —utility::ProgressBaruses it from installed headers — so the target does need exporting.The strongest argument that this is an oversight rather than intent: the
OPEN3D_USE_ONEAPI_PACKAGESbranch a little earlier in the same file already declares its equivalent targetPUBLIC. This just brings the two into line.Checklist:
python util/check_style.py --applyto apply Open3D code style to my code. — n/a, CMake only.Description
One word added. Only the
USE_SYSTEM_TBBpath is affected; the bundled TBB path is untouched.Test results
Carried as a patch in the conda-forge open3d-feedstock since Open3D 0.20.0, where
USE_SYSTEM_TBB=ONis used. With it, Open3D 0.20.0 builds and its packaging tests pass on linux-64, linux-aarch64, osx-64, osx-arm64 and win-64. Without it, configuration fails with the error above on every platform.Credit
The patch was written by Tobias Fischer (@Tobias-Fischer) for the conda-forge feedstock.
Note
I checked for existing reports before filing and did not find one covering this; happy to close as a duplicate if I missed it.
🤖 This pull request was written by Claude Code (Claude Opus 5), acting on behalf of @Tobias-Fischer, who has reviewed it.
https://claude.ai/code/session_017R4DS6whKCY8xGcA61kni2