[Solved] [Moved] Qt Creator , default parameter of make ?
I wanted to make the default parameter to "make -j4 -w" in the building directory , because for a big project, things went really slow on compiling , especially in windows / mingw32.
Enabling multi-thread of make , can cause problems to stop the process , i tried and it occured.
But still i wanted this to be an option in QtCreator's settings page , is there something already exists ? Or modify mkspec files ? I don't know much about this.
Open your project, go to Projects tab. You need to modify "Make:" part of the "Build steps" section.
while this works for single configurations of single projects, there is no general configuration (default settings) for that.
Feel free to vote for "QTCREATORBUG-6825":https://bugreports.qt.nokia.com/browse/QTCREATORBUG-6825
The suggestion of adding a general setting was rejected within minutes, so don't count on this being added to Creator eventually.
How about just setting the MAKEFLAGS environment variable? All decent make implementations use that (at least on Unix;-).
Don't seem to work with MAKEFLAGS ,
I tried: env MAKEFLAGS="-j4" qtcreator *pro , and it still launches
Make evaluates MAKEFLAGS itself, so you do not see this reflected in the command line triggered by Qt Creator.
Check your favorite process monitor: It should show several compilers running.
Here is a solution that works quite nicely. I export MAKEFLAGS, but you could as well add a -j<n> option directly to the script:
- Create a script similar to the following shell script, it is named qtcreator-make.sh for me (defaults to bash, works for me (tm)):
time nice -2 make $*
if [[ $rc != 0 ]] ; then
- Either "Override make" in the Qt Creator project setting and select the script, or call Creator from an environment where a link to this script named "make" is found before the platform make tool (usually /usr/bin/make).
Hope this helps!