Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommended flags for a minimalistic Qt build

I am trying to build Qt because it is required for Visual Studio 2010. The build script (configure.exe) is quite straightforward but by default it takes ages to compile. After waiting for an hour on a fast notebook with an SSD, I've given up (using no flags, just configure.exe).

What are the recommended flags for a basic, lightweight Qt application? I mean for someone learning Qt, who doesn't need WebKit and so on.

I've collected the most useful links I found:

The reference page for Qt configure: http://doc.qt.io/qt-4.8/configure-options.html

Ben's advice from this question: Building Qt 4.5 with Visual C++ 2010

-no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-multimedia -no-qt3support -fast

Rubenvb's advice from this question: How to compile Qt as static

  1. Disable debug: -release
  2. Disable modules you don't need, especially QtWebKit: -no-webkit -no-script -no-scripttools -no-qt3support -nomake demos -nomake tools -nomake examples
  3. Disable LTCG support, which has the nasty side effect of generating huge static libraries: no-ltcg
like image 570
hyperknot Avatar asked Apr 07 '11 20:04

hyperknot


1 Answers

That should be ok. Everything beyond webkit is just micro-optimization, if it comes to build times (webkit is huge). I wouldn't set -nomake tools when you want to explore Qt, as you might want to use those tools.

like image 170
Frank Osterfeld Avatar answered Nov 03 '22 23:11

Frank Osterfeld