gazebosim / gz-cmake

A set of CMake modules that are used by the C++-based Gazebo projects.
https://gazebosim.org/libs/cmake
Apache License 2.0
27 stars 31 forks source link

cmake warnings related to CMP0177 with cmake 3.31.0 #461

Open scpeters opened 2 weeks ago

scpeters commented 2 weeks ago

Environment

Description

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.