How to prevent Qt from compiling code examples: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''English''' [[ | '''English''' [[How_to_prevent_Qt_from_compiling_code_examples_Bulgarian|Български]] | ||
[[Category:HowTo]] | |||
=Compile Qt Faster by Skipping Examples= | '''NOTE:''' This guide is for Qt 4. See [[Building_Qt_5_from_Git]] for instructions for Qt 5. | ||
= Compile Qt Faster by Skipping Examples = | |||
Compiling Qt is fairly straight-forward, but quite a lengthy process. | Compiling Qt is fairly straight-forward, but quite a lengthy process. | ||
Line 9: | Line 11: | ||
To make it much quicker, an easy way is to prevent examples from being compiled. | To make it much quicker, an easy way is to prevent examples from being compiled. | ||
One way of doing it is: | One way of doing it is:<br />* extract source sdk (or git clone it)<br />* start configure with option "dont-process&quot; (works only on windows, doesn't seem to exist on Linux configure)<br /><code><br />configure -openssl -qt-libjpeg -qt-gif -qt-zlib -webkit -phonon -no-plugin-manifests -plugin-sql-sqlite -opensource -debug-and-release -confirm-license -dont-process<br /></code><br />* then launch explicitely newly created qmake to build only libs and tools<br /><code><br />QTDIR%/qmake/qmake -r QT_BUILD_PARTS="libs tools&quot;<br /></code><br />* Compile generated makefile<br /><code><br />nmake<br /></code> | ||
<br />Compilation time is improved by around 80 (approximately 100 minutes instead of 8 hours) and you end up with a perfectly usable Qt, in debug and release. | |||
* extract source sdk (or git clone it) | |||
* start configure with option | |||
* then launch explicitely newly created qmake to build only libs and tools<br /> | |||
* Compile generated makefile<br /> | |||
Compilation time is improved by around 80 | |||
= | On Linux configure and build can be accelerated by using all available cores.<br /><code><br />export MAKEFLAGS=-j4<br />configure -AllTheOptionsYouNeed<br />make -j4<br /></code> | ||
Note that compilation place is hardcoded inside qmake and used to find QMAKESPECs. You can however change it later using<br /><code><br />qmake -query<br />lists all available variable (mostly paths)<br />qmake -set<br />overrides previously hardcoded value |
Revision as of 10:01, 24 February 2015
English Български
NOTE: This guide is for Qt 4. See Building_Qt_5_from_Git for instructions for Qt 5.
Compile Qt Faster by Skipping Examples
Compiling Qt is fairly straight-forward, but quite a lengthy process.
To make it much quicker, an easy way is to prevent examples from being compiled.
One way of doing it is:
* extract source sdk (or git clone it)
* start configure with option "dont-process" (works only on windows, doesn't seem to exist on Linux configure)
<br />configure -openssl -qt-libjpeg -qt-gif -qt-zlib -webkit -phonon -no-plugin-manifests -plugin-sql-sqlite -opensource -debug-and-release -confirm-license -dont-process<br />
* then launch explicitely newly created qmake to build only libs and tools
<br />QTDIR%/qmake/qmake -r QT_BUILD_PARTS="libs tools&quot;<br />
* Compile generated makefile
<br />nmake<br />
Compilation time is improved by around 80 (approximately 100 minutes instead of 8 hours) and you end up with a perfectly usable Qt, in debug and release.
On Linux configure and build can be accelerated by using all available cores.
<br />export MAKEFLAGS=-j4<br />configure -AllTheOptionsYouNeed<br />make -j4<br />
Note that compilation place is hardcoded inside qmake and used to find QMAKESPECs. You can however change it later using
qmake -query
lists all available variable (mostly paths)
qmake -set
overrides previously hardcoded value