[Suggestion] QtCreator parallel compilation
-
In MS Visual Studio large solution with many projects may be compiled in "parallel" mode. It analyzes dependencies between projects and runs parallel compilation of projects on all available CPUs if projects are not dependent from each other.
QtCreator supplied with Qt 4.6.3 does not support this feature. Please correct me if I am wrong.
Are any plans exist to implement it in future releases? It speeds up compilation of large projects. Currently it is one of arguments to use MS Visual Studio against the QtCreator in our project (MS Visual Studio reduces compilation time).
-
This is supported provided you are using qmake (or any other supported build system) to tie together the projects.
It is not planned to have Qt Creator analyse dependencies between projects directly: The build systems do an excellent job with tracking dependencies between files, so we do not want to duplicate that in creator.
-
[quote author="Tobias Hunger" date="1290069977"]This is supported provided you are using qmake (or any other supported build system) to tie together the projects.[/quote]
Thank you for reply. Please drop a link or provide more details how can I use qmake to configure "parallel" building of many project from QtCreator.
-
blex: Qmake is unfortunately somewhat under-documented. I found it best to just learn from examples: Qt Creator has a working dependency setup in src/plugins/plugins.pro.
-
Go to the project view of Qt Creator, then to the build settings tab. If you have a qmake project there are some details on the build steps. The second one should be the details on the make step. You can add additional command line arguments to make there - just add -j4 to build four object files in parallel. That increases compiling speed too. You cannot build two separate projects (with their own .pro file) in parallel; but that's not a drawback anyways, as with the -jX switch your CPU is busy too.