Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How / where to add -j option ?
Forum Updated to NodeBB v4.3 + New Features

How / where to add -j option ?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 1.7k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    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'
    
    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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?

      A 1 Reply Last reply
      8
      • Kent-DorfmanK Offline
        Kent-DorfmanK Offline
        Kent-Dorfman
        wrote on last edited by
        #3

        $ 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.

        I light my way forward with the fires of all the bridges I've burned behind me.

        A 1 Reply Last reply
        1
        • Kent-DorfmanK Kent-Dorfman

          $ 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.

          A Offline
          A Offline
          Anonymous_Banned275
          wrote on last edited by
          #4

          @Kent-Dorfman

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

          Kent-DorfmanK 1 Reply Last reply
          0
          • Chris KawaC Chris Kawa

            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?

            A Offline
            A Offline
            Anonymous_Banned275
            wrote on last edited by
            #5

            @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...

            1 Reply Last reply
            0
            • A Anonymous_Banned275

              @Kent-Dorfman

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

              Kent-DorfmanK Offline
              Kent-DorfmanK Offline
              Kent-Dorfman
              wrote on last edited by
              #6

              @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.

              I light my way forward with the fires of all the bridges I've burned behind me.

              1 Reply Last reply
              2

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved