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

CMake Upgrade for ROS Melodic in Ubuntu 18.04 [closed]

asked 2019-02-08 15:50:47 -0600

ChandanSarkar gravatar image

updated 2019-02-08 18:57:15 -0600

jayess gravatar image

Hello Everyone,

In my ROS project I want to use a C++ library written by myself. This library builds with CMake itself and use the FetchContent module which was introduced in CMake version 3.11.

I intended to integrate the library in my package using FetchContent module as well and made necessary changes in the CMakeLists.txt file in package. At that point I was running CMake version 3.10 in ubuntu and naturally catkin_make failed.

I followed the steps described in this thread in order to upgrade my CMake version

in order to upgrade my CMake without removing the existing one. It worked. Now upon running cmake --version I have the following outcome.

cmake version 3.13.4

CMake suite maintained and supported by Kitware (

I also added the following lines in .bashrc as per the upgrade suggestions

export PATH=$HOME/cmake-install/bin:$PATH


I have also verified the installation by creating separate test CMake build with cmake_minimum_required(VERSION 3.13) and using FetchContent module. And the version upgrade was successful.

However, upon running catkin_make in my workspace, I still see the following failure

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- ~~  traversing 1 packages in topological order:

-- ~~  - my_package

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-- +++ processing catkin package: 'my_package'
-- ==> add_subdirectory(my_package)

CMake Error at my_package/CMakeLists.txt:1 (cmake_minimum_required): CMake 3.13 or higher is required.  You are running version 3.10.2

I am not being able to troubleshoot that, despite upgrading to CMake version 3.13 successfully, why catkin is still referring to the older version.

I am new to ROS. Could anyone please suggest me any troubleshooting steps ?

Thanks & Cheers,

Chandan Sarkar

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by ChandanSarkar
close date 2019-02-12 10:40:05.386136

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-12 10:39:46 -0600

ChandanSarkar gravatar image

Hello Everyone,

My problem is solved all by itself. It was strange from the beginning because I have carried out all the recommended steps and even rebooted the system a number of times. All of a sudden I discovered that the problem is gone. So the steps recommended in the mentioned links are functioning and should be accepted answer.

Thanks & Regards, Chandan Sarkar.

edit flag offensive delete link more

Question Tools



Asked: 2019-02-08 15:50:47 -0600

Seen: 4,094 times

Last updated: Feb 12 '19