Search code examples
makefilecmakeqt-creator

How to set a number of parallel jobs for make in Cmake QtCreator project?


My project is managed by CMake and I use QtCreator as a main IDE. I want to make QtCreator run make -j number_here command when it launches a build task to speed it up, but I am unable to find a corresponding configuration in QtCreator's project settings UI. I became somewhat lost in all it's settings.

Should I modify CMakeLists.txt file somehow or is it configurable from the QtCreator's UI?


Solution

  • You can configure this in Qt Creator:

    1. Go to: left panel/Projects/Build Settings.
      Note: On the left Build & Run, select the build of your targeted "Kit" if you have several.

    2. Build Steps (below CMake options), click Details.

    3. In Tools arguments: add -jnumber_here.

    4. Profit!

    ref: https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-build-j