I've been having some problems with Qt not being able to use the newest version of cmake.

I recently upgraded the version using apt-get

cmake --version
cmake version 3.2.2

But Qt somehow still uses 2.8, even though it should not be possible.

I guess I am running two versions, so I tried sudo apt-get purge cmake , and then reinstalling it, which led me to the same problem.

Is there some way I can test if I have two versions of cmake on my machine, and if I do, how do I remove it the old one?

Could this explain the issue:

dpkg --get-selections | grep cmake 
cmake                       install
cmake-data                  install
qtcreator-plugin-cmake:amd64            install
ros-indigo-cmake-modules            install

And here is the 2.8 version.

locate cmake-2.8 | head
cmake --debug-output

Will show you where is the cmake that it's using.

  • Hmm... output is pastebin.com/ydbSQzuZ – Lamda Oct 23 '17 at 9:32
  • How do you know it's using 2.8? Have you tried setting cmake_minimum_required (VERSION 3.2.2) in the cmakelists.txt? – Katu Oct 23 '17 at 10:02
  • When I change cmake_minimum_required(VERSION 2.8), it says that it uses 2.8... something.. – Lamda Oct 23 '17 at 10:03

I have a small tool to find all executables of a given name in my path. You can use this to see if there is more than one cmake in your path. The simple code is:


foreach dir ($path)
    if (-x $dir/$1) then
        echo "$dir/$1"

Save the above in a file named "every", chmod it to executable. then do "./every cmake". It should list all the cmake executables in your path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.