Important: Please read the Qt Code of Conduct -

CMake thrashing

  • Hi,

    I am having issues with cmake constantly reconfiguring itself whenever I change kits (or open a project or change session, but I can live with that).

    For example I have a large project that I want to build with both qt5.6 and qt5.12, so I have both kits enabled on the Projects page. But whenever I switch between 5.6 and 5.12, cmake reconfigures everything again which takes longer than it does for me to build the project if I've just made a few tweaks - in fact, I'm kind of scared to touch anything on the projects page in case it 'triggers' cmake! And I have done this many times, eg: disabled a kit when I meant to switch to it etc.

    I am no expert on cmake, but I kind of thought the point was to be able to separate builds into different out-of-project cmake-build dirs so they wouldn't affect each other.

    I am not editing CMakeLists.txt and have 'autorun cmake' disabled on kits->cmake page. But I am not editing CMakeLists.txt so I wouldn't expect this to do anything anyway.

    I am running QtCreator 4.10.1 (and otherwise love it!)


  • Lifetime Qt Champion

    This is a problem of qtcreator, not cmake. Best is to use two different source directories - otherwise CMakeLists.txt.user is overwritten and you will see this behavior. Go and blame qtcreator and not cmake.

Log in to reply