osrf / docker_images

A repository to hold definitions of docker images maintained by OSRF
Apache License 2.0
527 stars 168 forks source link

`googletest` library cmake version #686

Closed pseusys closed 9 months ago

pseusys commented 11 months ago

I have created my Dicker image based on noetic-ros-base-focal. When I run catkin_make in it, I see the following warnings:

CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

Is this an issue of the official image - or have I messed up with something? Is it possible to update googletest somehow to remove the warning?

evenrohancodes commented 11 months ago

Make sure you are using the latest version of the Docker image. The maintainers of the image might update their packages, including googletest, to use newer CMake versions, which could resolve the warnings.

If you are directly depending on the googletest library in your project, check if there are any updates available for googletest that might have addressed this warning.

mikaelarguedas commented 11 months ago

Could you provide the first lines of the CMakeLists.txt of the package that is raising this warning ?

It looks to me like this come from one of your own packages that specifies a cmake minimum version that is too low (< 2.8.12) As an example roscpp (and all ROS Noetic packages) specify CMake 3.0.2 as their minimum version: https://github.com/ros/ros_comm/blob/030e132884d613e49a576d4339f0b8ec6f75d2d8/clients/roscpp/CMakeLists.txt#L1

pseusys commented 11 months ago

I am using the latest image version (ros:noetic-ros-base-focal) and none of my packages depend on googletest. My package depends on cmake version 3.26 (the first line is cmake_minimum_required(VERSION 3.26)). Yet the warning is still present.

mikaelarguedas commented 11 months ago

This is unfortunately not enough information to reproduce your issue and assist you. Could you provide a simple repreducible example SSCCE ?

Its either something in your workspace or in one of your dependencies, reproducing the issue will help guide you to the right place to report the problem


PS Ubuntu Focal (the ubuntu image ROS Noetic is based on) ships with CMake 3.16.3

mikaelarguedas commented 9 months ago

Closing as no reproducible example. feel free to comment here with more details and we can reopen this issue