[Qt-creator] importing "foreign" cmake projects remains problematic

René J.V. Bertin rjvbertin at gmail.com
Sat Jun 10 12:54:22 CEST 2017

To make another (more succinct) case for having a way to configure a cmake configuration step:

- there are moments in the lifetime of a project you're working on where you need to reset the build. Sometimes that means discarding the whole build directory, sometimes you only need to discard the CMakeCache.txt file, and sometimes it's proven to be a good compromise to discard "CMake*" in the build.dir toplevel.
- consider a project that can be built for Mac, MSWindows, X11 and why not Wayland, each with their own set of included source files and possibly build targets. In an IDE like KDevelop you can simply add a new build directory to the project and configure all aspects of the details cmake invocation - aspects which will be saved and used each time cmake needs to be run. 

In both cases I'd typically want to be able to get the project layout displayed appropriately in the IDE before I run a build. IOW, Creator's feature where you launch the build via `cmake --build <here> --target <foo>` is not exactly what I'd expect even if it probably does the job (just kill the build when it starts, right?).

I've managed to support "server" mode via my cmake2port wrapper. With that I indeed get the entire project in view, including files generated in the build.dir. But there appears to be no way to specify the usual -DCMAKE_FOO arguments in that mode so I'm a bit suspicious of the whole thing.


More information about the Qt-creator mailing list