Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions

How / where to add -j option ?



  • I like to speed build process by optioning " make " with -j option .
    Add in QMAKE fails to do it, wrong place.

    QMAKE_CXXFLAGS += -w
    QMAKE_CXXFLAGS += -j
    
    :-1: error: error: unrecognized command line option '-j'
    

  • Moderators

    QMAKE_CXXFLAGS is for passing arguments to the C++ compiler, not make.
    I don't think you can specify make options in the .pro file, but you can add them by going to your project build settings and entering it in the build steps section "Make arguments", as shown here.

    That piece of documentation also says that Qt Creator is by default using all cores available, so is that not working for you out of the box without passing extra arguments?


  • Moderators

    QMAKE_CXXFLAGS is for passing arguments to the C++ compiler, not make.
    I don't think you can specify make options in the .pro file, but you can add them by going to your project build settings and entering it in the build steps section "Make arguments", as shown here.

    That piece of documentation also says that Qt Creator is by default using all cores available, so is that not working for you out of the box without passing extra arguments?



  • $ qmake -project
    $ make -j n

    Since the -j option is directly applied to the make line it would be odd to add it as a Qt specific option. If you don't like the default make behavior then put a wrapper around it.



  • @Kent-Dorfman

    Projects -> Build Steps -> Make Arguments -j or -j plus # of cores



  • @Chris-Kawa
    No, it was not working until I remember how to set it up after (another) new install. ( My OS keeps misbehaving...)
    I need to print "how to install AND CONFIGURE QtCreator AFTER one has been using int for a while and JUST reinstalled it AGAIN and AGAIN...



  • @AnneRanch

    your command sequence is jiberish. you make absolutely no mention of doing a build in any sort of IDE or gui. Please be more descriptive of your build environment if you are looking for IDE solutions.


Log in to reply