Dankevich
Dankevich

Reputation: 304

Qt creator doesn't see right CMake version

I am trying to compile C++ project in Qt creator using CMake, but get a message:

error: CMake 3.1 or higher is required. You are running version 3.0.2

In terminal cmake --version gives 3.7.0, which cmake gives /usr/local/bin/cmake. In Qt creator I go

Tools>Options>CMake

but the version under /usr/local/bin/cmake is auto-detected and set as default. And of course the project won't compile if I just manually lower the required version (I tried).

I don't get what else can be wrong. Maybe the problem is somewhere else?

Upvotes: 5

Views: 4702

Answers (2)

Dankevich
Dankevich

Reputation: 304

Thanks to @NicolasHolthaus I realized i just had two working versions of CMake installed on my machine. I deleted both, then reinstalled one and now everything works.

Upvotes: 1

Tobias Hunger
Tobias Hunger

Reputation: 595

Please check the output in the "General Messages" output pane at the bottom of the window (you might need to enable that with the small button on the right next to the list of panes).

Creator will show what it runs there. Is it indeed using the expected cmake? If not: Change it in Tools>Options>Build & Run>Kits.

Upvotes: 2

Related Questions