Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the build configuration "profile" do?

Tags:

qt-creator

qt5

I just upgraded to Qt 5.6.0. I noticed something that I did not notice before. A new project in Qt Creator gets now three build configurations: "release", "debug" and "profile", It seems to me that "profile" is new. If so what is its purpose?

like image 501
adlag Avatar asked Mar 21 '16 08:03

adlag


People also ask

What is build configuration?

A build configuration is a collection of settings used to start a build and group the sequence of the builds in the UI. Examples of build configurations are distribution, integration tests, prepare release distribution, "nightly" build. A build configuration belongs to a project and contains builds.

What is build configuration in Visual Studio?

Applies to: Visual Studio for Mac Visual Studio. Build configurations give you precise control over a build allowing you to create configurations to cater to different testing and distribution situations. You can create build configurations for individual projects or on a solution-wide basis.


2 Answers

When I looked at Projects -> Build steps -> Effective qmake call, I have found this additional CONFIGS:

"CONFIG+=force_debug_info" "CONFIG+=separate_debug_info"

Also I found some comments for them that could clarify why this is needed:

Hello all,

once more I'm preparing a Qt 5 build for profiling purposes and wonder again why there is no way to combine -release and -debug in Qt's configure script. The only way to get a sane build for profiling Qt code itself that I know of is hacking the mkspec and ensuring that -g is added even in -release mode.

Is there any reason for that? Could we improve this situation somehow to make it simpler to get a Qt build with optimizations and debug symbols?

Am I missing the recommended way to get this done?

This option produces release builds (with all compiler optimization), but with debug symbols (pdb files) that are required for testing performance of C++.

like image 101
Yuriy Pryyma Avatar answered Oct 06 '22 22:10

Yuriy Pryyma


According to the online Qt documentation (Breadcrumb: "Qt Creator Manual" > "Specifying Build Settings", end of 1st paragraph):

A profile configuration is an optimized release build that is delivered with separate debug information. It is best suited for analyzing applications.

Link can be found here. I'm still a Qt newbie, and have personally never used this configuration.

like image 27
Fabien Teulieres Avatar answered Oct 06 '22 21:10

Fabien Teulieres