ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to fix unstable build on buildfarm for noetic because of CMP0048?

asked 2020-09-04 12:40:46 -0500

rreignier gravatar image

updated 2020-09-04 12:41:16 -0500

I have just released my package on Neotic and the buildfarm reports an unstable build on Ndev_* because of CMake warning CMP0048 than means that VERSION is not provided in the project().

From the console output:

16:09:34 CMake Warning (dev) at CMakeLists.txt:2 (project):
16:09:34   Policy CMP0048 is not set: project() command manages VERSION variables.
16:09:34   Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
16:09:34   command to set the policy and suppress this warning.
16:09:34   The following variable(s) would be set to empty:
16:09:34 This warning is for project developers.  Use -Wno-dev to suppress it.

I have checked other ROS packages and they don't seem to provide a version in their CMakeLists.txt nor set the CMP0048 policy explicitly.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-09-04 12:44:32 -0500

Dirk Thomas gravatar image

To avoid the warning with newer CMake versions you want to bump the minimum CMake version declared in the package. ROS packages for active distros use the following:

cmake_minimum_required(VERSION 3.0.2)
edit flag offensive delete link more


Great, thank you!

rreignier gravatar image rreignier  ( 2020-09-04 13:22:00 -0500 )edit

Yes this works, but I am getting an error if I am using 3.0.2 with meta packages

Markus Bader gravatar image Markus Bader  ( 2020-12-18 16:01:46 -0500 )edit

If you're getting an error due to metapackages, it means the version of catkin_pkg is too old. Upgrade that sudo apt upgrade python3-catkin-pkg. You need at least version 0.4.16 so it has this fix:

sloretz gravatar image sloretz  ( 2020-12-18 16:10:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-09-04 12:40:46 -0500

Seen: 1,192 times

Last updated: Sep 04 '20