huahsin68
huahsin68

Reputation: 6989

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?

Upvotes: 10

Views: 8591

Answers (4)

tibur
tibur

Reputation: 11636

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.

Upvotes: 2

Macke
Macke

Reputation: 25690

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.

Upvotes: 2

Frank Osterfeld
Frank Osterfeld

Reputation: 25165

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.

Upvotes: 4

rubenvb
rubenvb

Reputation: 76579

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.

Upvotes: 17

Related Questions