Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to shorten the Qt make process?

I have downloaded an open source Qt that target on Windows. Since I am using the VS2010 command prompt to do the installation, it automatically set the platform to msvc-2010. When I am trying to build using nmake, it took about 7-8 hours to complete the installation. During the process, I have notice that Qt is compiling the libraries which I don't need like javascript.

May I know how can I shorten the build process since I am focusing on desktop development?

like image 768
huahsin68 Avatar asked Jun 02 '11 13:06

huahsin68


4 Answers

As @tibur said, you can use jom, which is a kind of "parallel nmake". You can also pass several options to Qt's configure, some of which are:

  1. -release or -debug: build only release or debug binaries
  2. -nomake demos, -nomake examples, -nomake tools: don't build well, demos, examples or tools.
  3. -no-webkit, -no-qt3support, -no-script, -no-scripttools: disable certain Qt modules.

There may be more, configure.exe --help will tell you all the options available to you.

like image 137
rubenvb Avatar answered Nov 18 '22 03:11

rubenvb


The one big library taking the longest is webkit. If you don't need webkit, you can pass

-no-webkit

and the build time should go down significantly. Most other flags (like -nomake demos, -nomake examples, see rubenvb's answer) are microoptimization in comparison.

like image 20
Frank Osterfeld Avatar answered Nov 18 '22 04:11

Frank Osterfeld


I configure Qt to build vcproj files and then use vcbuild which supports multi-threaded builds, using /M4 or /M8 option:

/M<number> Specifies the number of concurrent builds to run, if possible

You can also build with devenv.com which builds concurrently if you've configured that in your IDE options.

Both of these are like jom, apparently, but this works w/o installing anything else.

like image 2
Macke Avatar answered Nov 18 '22 05:11

Macke


Take a look at jom.

jom is a clone of nmake to support the execution of multiple independent commands in parallel. It adds the -j command line switch similar to GNU make.

like image 2
tibur Avatar answered Nov 18 '22 05:11

tibur