Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to make compilation single threaded in QMake?
Forum Updated to NodeBB v4.3 + New Features

How to make compilation single threaded in QMake?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 3 Posters 436 Views 2 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.
  • M Offline
    M Offline
    MMD18
    wrote on last edited by
    #1

    I know that you can add -j1 flag to make, but how can you do it in QMake? Long time ago there was a variable MAKEFLAGS but now there're hundreds of different variables instead: https://doc.qt.io/qt-5/qmake-variable-reference.html

    I tried to add this flag to QMAKE_LFLAGS, to QMAKE_CXXFLAGS and so on, it didn't help, I still got this line in compile output

    15:23:29: Starting: "/usr/bin/make" -j2
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Neither qmake or cmake can do something wrt this in their config files.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        It looks like you are using Qt Creator, it's there that you should put that configuration.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        M 1 Reply Last reply
        1
        • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
        • SGaistS SGaist

          Hi,

          It looks like you are using Qt Creator, it's there that you should put that configuration.

          M Offline
          M Offline
          MMD18
          wrote on last edited by MMD18
          #4

          @SGaist Could you please tell me where I can find this option?
          P.S Found by myself in Projects > Build settings > Build steps > Make > Parallel jobs

          1 Reply Last reply
          1
          • Christian EhrlicherC Online
            Christian EhrlicherC Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            You can set the number of parallel jobs in the project settings of your project (under build settings)

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            1

            • Login

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