CMake: Using Jom with Qt Creator 4.0

Set the default make program to Jom

May 13, 2016 - 1 minute read -
qtcreator programming

With the release of Qt Creator 4.0, the use of CMake becomes less painful. But nmake is the default make program so the use of -j X is not an option. Fortunately, Qt Creator allows to set default CMake settings for each kits we have. So we can use Jom and get our parallel build back.

To use Jom, you can either set the CMake program in your CMakeLists.txt file like so:

set(CMAKE_MAKE_PROGRAM "E:/Qt/Tools/QtCreator/bin/jom.exe" CACHE STRING "Set make program to jom" FORCE)

Or you can set the value in CMake configuration settings to make it default for all the projects. Open the settings window and go to Build & Run -> Kits

settings_page

And then click on the Change button at the bottom next to CMake Configuration label.

cmake_configuration_page

And add this line to the bottom:

CMAKE_MAKE_PROGRAM:STRING=E:/Qt/Tools/QtCreator/bin/jom.exe

Now you can add -j X to Tool arguments in Projects tab as usual.