Skip to content

cv_bridge: suppress CMP0167 warning from find_package(Boost) - #568

Open
Functionhx wants to merge 1 commit into
ros-perception:rollingfrom
Functionhx:fix/cmp0167-boost-warning
Open

cv_bridge: suppress CMP0167 warning from find_package(Boost)#568
Functionhx wants to merge 1 commit into
ros-perception:rollingfrom
Functionhx:fix/cmp0167-boost-warning

Conversation

@Functionhx

Copy link
Copy Markdown

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.

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>
@mergify

mergify Bot commented Jul 12, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@Functionhx

Copy link
Copy Markdown
Author

@Mergifyio queue

@mergify

mergify Bot commented Jul 12, 2026

Copy link
Copy Markdown

queue

☑️ Command disallowed due to command restrictions in the Mergify configuration.

Details
  • sender-permission >= write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cv_bridge CMakeLists triggers CMP0167 (FindBoost removed) on CMake 3.30+

1 participant