[Qt-creator] Generating QtCreator cmake project for given CMakeLists.txt from command line

René J. V. Bertin rjvbertin at gmail.com
Thu Apr 14 18:19:35 CEST 2016


Nikolaus Demmel wrote:

Hi,

> I was woundering if it is at all possible to generate a QtCreator project for
> a given `CMakeLists.txt` from command line, i.e. generating the
> `CMakeLists.txt.user` from command line while giving some parameters, such as
> the desired configurations and according build directories.

I'm not sure if I really grasped everything outlined in the OP, but I think I 
have a similar question for a comparable workflow that doesn't involve ROS or 
catkin.
It does involve a distribution/packaging system that runs cmake (and make) in a 
tightly controlled environment and with highly specific commandline options. 
When developing (or adapting) software in the context of that system it is often 
useful to be able to open a work directory (containing directories with the 
[patched] source and an out-of-tree build directory) in an IDE, possibly even 
(re)building parts of the code.

It is trivial to let the system have cmake use the "CodeBlocks - Unix Makefiles" 
generator, but apparently that is not enough to let Qt Creator reuse the 
configured build directory without re-running cmake. It is easy enough to re-run 
the correct configure command if QtC calls cmake only once, on the initial 
import. It's a different story if it keeps doing this each time a project is 
(re)opened.

Is there a way to prevent QtC from re-running cmake each time it feels like 
doing so?

Thanks,
René




More information about the Qt-creator mailing list