Article by Ayman Alheraki on January 11 2026 10:36 AM
IncrediBuild is a distributed build acceleration tool that significantly speeds up C++ compilation using parallel processing. It integrates seamlessly with Microsoft Visual C++ (MSVC), enabling faster builds without the need for CMake, Meson, or MSBuild.
This guide explains how to:
Set up IncrediBuild for MSVC
Compile single and large projects
Optimize C++20, C++23, and C++26 builds
Automate builds using Batch Scripts and PowerShell
Download IncrediBuild from the official website.
Install it on all machines in the build network.
Ensure you have:
MSVC (cl.exe) installed
IncrediBuild Build Console available in the Developer Command Prompt
Run the following command in PowerShell or Command Prompt:
xxgconsole /?
If IncrediBuild is installed correctly, this will display the available options.
Instead of running:
xcl /std:c++23 main.cpp /Fe:my_program.exe
Run with IncrediBuild:
xBuildConsole /command="cl /std:c++23 main.cpp /Fe:my_program.exe"
This accelerates compilation using IncrediBuild’s distributed caching.
xcl /c src\main.cpp /Fo:build\main.objcl /c src\helper.cpp /Fo:build\helper.objcl /c src\module\math.cpp /Fo:build\math.objcl build\main.obj build\helper.obj build\math.obj /Fe:my_program.exe
xConsole /command="cl /c src\main.cpp /Fo:build\main.obj"BuildConsole /command="cl /c src\helper.cpp /Fo:build\helper.obj"BuildConsole /command="cl /c src\module\math.cpp /Fo:build\math.obj"BuildConsole /command="cl build\main.obj build\helper.obj build\math.obj /Fe:my_program.exe"
This allows parallel compilation, improving build speed.
xmy_project/├── src/│ ├── main.cpp│ ├── helper.cpp│ ├── module/│ │ ├── math.cpp│ │ ├── physics.cpp├── include/│ ├── helper.hpp│ ├── module/│ │ ├── math.hpp│ │ ├── physics.hpp├── build/
Instead of manually compiling each file:
xBuildConsole /command="cl /Iinclude /c src\*.cpp /Fo:build\"
This compiles all C++ files in the src/ directory in parallel.
xBuildConsole /command="cl build\*.obj /Fe:my_project.exe"
This speeds up linking by optimizing dependencies.
Large projects require efficient linking. Use:
xBuildConsole /command="link /OUT:my_project.exe build\*.obj"
IncrediBuild speeds up linking by parallelizing static and dynamic library resolution.
xBuildConsole /command="cl /O2 /GL src\*.cpp /Fo:build\"
Enabled optimizations:
/O2 → Optimize for speed
/GL → Whole-program optimization
xBuildConsole /command="cl /Zi /Od src\*.cpp /Fo:build\"
Debugging enabled:
/Zi → Generates debugging symbols
/Od → Disables optimizations for accurate debugging
build.batx@echo offmkdir buildBuildConsole /command="cl /c /Iinclude src\main.cpp /Fo:build\main.obj"BuildConsole /command="cl /c /Iinclude src\helper.cpp /Fo:build\helper.obj"BuildConsole /command="cl /c /Iinclude src\module\math.cpp /Fo:build\math.obj"BuildConsole /command="cl build\*.obj /Fe:my_project.exe"echo Build complete!
xbuild.bat
This automates the full project build.
For more flexibility, use PowerShell instead of Batch scripts:
build.ps1xNew-Item -ItemType Directory -Path "build" -ErrorAction SilentlyContinue& BuildConsole /command="cl /c /Iinclude src\main.cpp /Fo:build\main.obj"& BuildConsole /command="cl /c /Iinclude src\helper.cpp /Fo:build\helper.obj"& BuildConsole /command="cl /c /Iinclude src\module\math.cpp /Fo:build\math.obj"& BuildConsole /command="cl build\*.obj /Fe:my_project.exe"Write-Output "Build complete!"
x.\build.ps1
This approach allows more control over the build process.
| Feature | IncrediBuild | CMake/Meson |
|---|---|---|
| Build Acceleration | Yes (Distributed) | No |
| Parallel Compilation | Yes | Yes |
| Automatic Dependency Management | No | Yes |
| Cross-Platform Builds | No | Yes |
| Ease of Use | Simple | Complex |
| Recommended For | Large MSVC Projects | Cross-Platform Projects |
IncrediBuild is best for large MSVC projects needing parallel builds, while CMake and Meson are better for cross-platform projects.
IncrediBuild with MSVC provides faster compilation without requiring CMake or Meson.
Best suited for large projects requiring parallel builds
Automates compilation with Batch/PowerShell scripts
Improves performance through distributed builds