Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting default make options for Qt Creator?

How can i override default make parameters , which is:

make -w

Each time i create a project , i had to modify project settings , adding -j4 to make parameters.

Can i set make -w -j4 by default ?

EDIT

The best way to do this is setting MAKEFLAGS environment variable , i'm picking the only answer as the best only to shut this thread down.

To set this for UNIX, modify the *.desktop file of Qt Creator , prefix the line entitled Exec= with env MAKEFLAGS=-j4 , but be aware that you won't be able to cease building in QtCreator immediately after setting to multithread.

like image 311
daisy Avatar asked Jan 14 '12 06:01

daisy


People also ask

How do I set environment variables in Qt?

You can edit existing environment variables or add, reset and unset new variables based on your project requirements. To globally change the system environment from the one in which Qt Creator is started, select Edit > Preferences > Environment > System, and then select Change in the Environment field.

Where does Qt Creator store settings?

On Windows in general, the files are located in %APPDATA%\QtProject and %LOCALAPPDATA%\QtProject .

How do I change the build directory in Qt?

Also recently, newer versions of Qt have another little button on the right hand side of the "build directory" input field. It is has like a blue arrow on mine. Click it and you can view all the global build variables.


1 Answers

To make it global and permanent go to

Tools > Options > Build & Run > Kits > (pick your toolchain) 

and fill your predefined env settings: MAKEFLAGS=-j4

Screenshot what to click exactly

like image 145
dimril Avatar answered Sep 20 '22 23:09

dimril