Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Why can't I use -J4 anymore in Build Steps Additional Arguments ?
elpidiovaldez5 last edited by
I always use -J4 as an additional build option to get faster build times by using 4 threads. Suddenly I can't use it any more. I have just installed Qtcreator 4.1.0. Perhaps that is the culprit, but surely this is still possible.
If I add the option the build does not start and just shows a red progress bar. I am sure I am doing something really obviously wrong, but I can't see it ! The following message is printed:
02:06:18: Running steps for project Robot... 02:06:18: Starting: "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" /home/paul/Documents/C++/Robot2016/Robot/Robot/Robot.pro -spec linux-g++-64 CONFIG+=debug -J4 Usage: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake [mode] [options] [files] QMake has two modes, one mode for generating project files based on some heuristics, and the other for generating makefiles. Normally you shouldn't need to specify a mode, as makefile generation is the default mode for qmake, but you may use this to test qmake on an existing project Mode: -project Put qmake into project file generation mode In this mode qmake interprets files as files to be built, defaults to *; *; *; *.ts; *.xlf; *.qrc Note: The created .pro file probably will need to be edited. For example add the QT variable to specify what modules are required. -makefile Put qmake into makefile generation mode (default) In this mode qmake interprets files as project files to be processed, if skipped qmake will try to find a project file in your current working directory Warnings Options: -Wnone Turn off all warnings; specific ones may be re-enabled by later -W options -Wall Turn on all warnings -Wparser Turn on parser warnings -Wlogic Turn on logic warnings (on by default) -Wdeprecated Turn on deprecation warnings (on by default) Options: * You can place any variable assignment in options and it will be * * processed as if it was in [files]. These assignments will be parsed * * before [files]. * -o file Write output to file -d Increase debug level -t templ Overrides TEMPLATE as templ -tp prefix Overrides TEMPLATE so that prefix is prefixed into the value -help This help -v Version information -after All variable assignments after this will be parsed after [files] -norecursive Don't do a recursive search -recursive Do a recursive search -set <prop> <value> Set persistent property -unset <prop> Unset persistent property -query <prop> Query persistent property. Show all if <prop> is empty. -cache file Use file as cache [makefile mode only] -spec spec Use spec as QMAKESPEC [makefile mode only] -nocache Don't use a cache file [makefile mode only] -nodepend Don't generate dependencies [makefile mode only] -nomoc Don't generate moc targets [makefile mode only] -nopwd Don't look for files in pwd [project mode only] ***Unknown option -J4 02:06:18: The process "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" exited with code 1. Error while building/deploying project Robot (kit: Desktop) When executing step "qmake" 02:06:18: Elapsed time: 00:00.
Paul Colby last edited by Paul Colby
As far as I know,
qmakehas never had support for running multiple jobs in parallel. I wouldn't really expect it to either, since its simply a build script generator (albeit a pretty advanced one). It's actually the
make(most platforms) or
nmake(Windows) commands that control the builds, so its those commands that you'd want to use
-j4(or equivalent) with.
For example, on Linux:
qmake make -j4
or on Windows:
qmake nmake /MP4
elpidiovaldez5 last edited by
Both of you are right, but the stupid thing, that I could not see, was that I was using the qmake arguments field in QtCreator instead of the make arguments field.
Thanks very much.