[Solved] [Moved] Qt Creator , default parameter of make ?
-
Hi,
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.
-
@p-himik:
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
-
Update:
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 -w
-
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)):
#!/bin/bash
export PATH=/opt/icecream/bin:/usr/lib/icecc/bin:$PATH
time nice -2 make $*
rc=$?
if [[ $rc != 0 ]] ; then
exit $rc
fi- 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!
Mirko.