Remove -j 4 when building with Visual Studio Code's CMake Tools extension

Viewed 944

When I use CMake Tools extension to build a project or all projects in Visual Studio Code, it always adds -- -j 4 to build command:

[proc] Executing command: /usr/bin/cmake --build /home/tc/MyProject/build --config Release --target all -- -j 4

How do I remove it? I think it belongs to the CMake Tools extension configuration but I don't know where it is.

1 Answers

Using Visual Studio Code 1.47.3 and CMake Tools 1.4.1:

  1. Go to the settings page.
  2. Search for "parallel".
  3. Look for the item titled "CMake: Parallel Jobs".

The default for this setting appears to be 0, which presumably causes the tool to determine the -j argument dynamically.

  1. Select the scope (e.g., User, Workspace, etc.) in which you want to customize the setting.
  2. Change the value to whatever whole number you prefer--1 to disable parallel build tasks.
Related