[Qt-creator] cmake w/Windows

Andy asmaloney at gmail.com
Mon Jan 28 14:35:29 CET 2019


On Mon, Jan 28, 2019 at 4:59 AM Tobias Hunger <Tobias.Hunger at qt.io> wrote:

> On Sat, 2019-01-26 at 11:52 -0500, Andy wrote:
> > I'm having problems getting cmake setup with Qt Creator under Windows.
> >
> > - I have cmake installed from the official release (3.13.3)
> > - cmake is in the PATH
> > - in Kits->CMake I set the path manually since it is not auto-detected
> > - in Kits->Kits, I select my (auto-detected) kit to MSVC2017 64bit
> > - for cmake generator I select NMake Makefiles & Codeblocks
> >
> > I get this error:
> >
> > error: Failed to activate protocol version: "CMAKE_GENERATOR" is set but
> > incompatible with configured generator value.
>
> This looks like you are trying to use an existing build directory?
>

"exisitng" in the sense that Creator created it, yes.


> Check the CMakeCache.txt file in there: That should contain a
> CMAKE_GENERATOR,
> which apparently is not the one you set up creator to use.
>
> Try with a fresh build directory or try to match up the generator set up in
> Creator and the one used in your build directory.
>

This did it - thank you.

I guess my disconnect was twofold:

- When setting up cmake initially, the kits don't have any generator set,
so it results in confusion. When I added cmake and tried to run it on my
project it created the build dir, so CMAKE_GENERATOR ended up empty. Maybe
when setting cmake for the first time it in the prefs Creator should
reminder the developer that "The following kits are not set up properly to
use cmake. You need to set the generators." or something like that.

- The error message (to me - a non-cmake guy) didn't help (or maybe I was
coffee-deprived enough that it didn't make sense). Maybe having it output
the values that are different would help? And possibly offer a solution to
the user? "Change the project's setting in its CMakeCache.txt or change the
kit setting in the preferences."

Anyway - it's going now. Thanks a lot Tobias!



> Best Regards,
> Tobias
>
> --
> Tobias Hunger, Senior Software Engineer | The Qt Company
> The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
> Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der
> Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB
> 144331 B
>


---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20190128/f275069d/attachment.html>


More information about the Qt-creator mailing list