Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake warnings related to CMP0177 with cmake 3.31.0 #461

Open
scpeters opened this issue Nov 12, 2024 · 1 comment
Open

cmake warnings related to CMP0177 with cmake 3.31.0 #461

scpeters opened this issue Nov 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@scpeters
Copy link
Member

Environment

  • OS Version: macOS 13.6.3-x86_64
  • Source or binary build? source build of gz-plugin3 (gazebosim/gz-plugin@faaf65e) but appears to affect other versions as well, using binary version of gz-cmake4 4.1.0

Description

  • Expected behavior: it should build with no cmake warnings
  • Actual behavior: it has a cmake warning on macOS using the latest cmake 3.31.0 from homebrew

Steps to reproduce

  1. Install cmake 3.31
  2. Install gz-plugin dependencies
  3. Configure gz-plugin
  4. Observe warning

Output

Build Status https://build.osrfoundation.org/job/gz_plugin-ci-gz-plugin3-homebrew-amd64/21/cmake/

CMake Warning (dev) at /usr/local/share/cmake/gz-cmake4/cmake4/GzInstallAllHeaders.cmake:182 (install):
  Policy CMP0177 is not set: install() DESTINATION paths are normalized.  Run
  "cmake --help-policy CMP0177" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  core/include/gz/plugin/CMakeLists.txt:1 (gz_install_all_headers)

Related: from cmake 3.31.0 release notes

The install() command's DESTINATION arguments are now normalized, with the exception of INCLUDES DESTINATION arguments in install(TARGETS). See policy CMP0177.

@scpeters
Copy link
Member Author

scpeters commented Dec 2, 2024

I think we should try setting

if(POLICY CMP0177)
  cmake_policy(SET CMP0177 NEW)
endif()

and see if anything breaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Inbox
Development

No branches or pull requests

2 participants