cv_bridge: suppress CMP0167 warning from find_package(Boost) - #568
Open
Functionhx wants to merge 1 commit into
Open
cv_bridge: suppress CMP0167 warning from find_package(Boost)#568Functionhx wants to merge 1 commit into
Functionhx wants to merge 1 commit into
Conversation
The CMakeLists.txt calls find_package(Boost) twice (lines 26 and 37 in the non-disabled Python path), which triggers the CMP0167 warning in CMake 3.30+ because FindBoost.cmake (module mode) and BoostConfig.cmake (config mode) both exist. Set CMP0167 to NEW before any Boost lookups to suppress the warning. Fixes: ros-perception#567 Test Plan: built cv_bridge with CMake 3.30+, confirmed no CMP0167 warning Signed-off-by: Functionhx <2994114386@qq.com>
|
Tick the box to add this pull request to the merge queue (same as
|
Author
|
@Mergifyio queue |
☑️ Command disallowed due to command restrictions in the Mergify configuration.Details
|
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.
cv_bridge CMakeLists.txt calls find_package(Boost) twice -- once to check the version (QUIET) and once with COMPONENTS to link python. In CMake 3.30+, this triggers a CMP0167 warning because both FindBoost.cmake (module mode) and BoostConfig.cmake (config mode) exist.
Set CMP0167 to NEW before any find_package(Boost) calls to suppress the warning. Guarded with if(POLICY CMP0167) so older CMake versions are unaffected.
Fixes #567.