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?
From the release notes: The cmake(1) Build a Project ( cmake --build ) gained --parallel [<jobs>] and -j [<jobs>] options to specify a parallel build level. They map to corresponding options of the native build tool. As mentioned by dkg, you can also set the environment variable CMAKE_BUILD_PARALLEL_LEVEL .
Qt Creator uses the default CMake if it does not have enough information to choose the CMake to use. To set the selected CMake executable as the default, select Make Default. To remove the selected CMake executable from the list, select Remove. Select the Kits tab to add the CMake tool to a build and run kit.
Both are build systems, but they're not very similar at all. If your project uses Qt, you're probably best off using qmake. CMake is more generic, and fits pretty much any type of project. Both qmake and CMake generate a Makefile, which is read by make to build the project.
CMake is an alternative to qmake for automating the generation of build configurations. Setting Up Qbs. Qbs is an all-in-one build tool that generates a build graph from a high-level project description (like qmake or CMake do) and executes the commands in the low-level build graph (like make does).
You can configure this in Qt Creator:
Go to: left panel
/Projects
/Build Settings
.
Note: On the left Build & Run
, select the build
of your targeted "Kit" if you have several.
Build Steps
(below CMake options), click Details
.
In Tools arguments:
add -jnumber_here
.
Profit!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With