Set the number of threads in a CMake build

后端 未结 2 1773
忘了有多久
忘了有多久 2021-02-01 01:13
cmake --build . --config Release

Is it possible to set the number of cores to be used by the build process?

I\'m looking for something similar

2条回答
  •  猫巷女王i
    2021-02-01 01:48

    According to the Release Notes, with CMake 3.12 it can be done cross-platform:

    The cmake(1) Build Tool Mode (cmake –build) gained --parallel [] and -j [] options to specify a parallel build level. They map to corresponding options of the native build tool.

提交回复
热议问题