-
They execute compilation commands directly (e.g.,
gcc,clang,javac). -
Work with specific configuration files (
Makefile,build.ninja). -
Called manually or by meta-build tools.
Command Runners
About
-
Batch file style.
-
No Incremental Builds, no Change Detection.
-
"Has this source file changed since it was compiled, or its dependencies?"
-
Just (or JustFile)
-
Impressions :
-
Seems to provide very few options for args and conditional execution of programs.
-
Apparently on Windows it must be run via cmd or powershell, so any programming is internally done by the chosen shell, OR through Just’s own language.
-
Didn’t like it.
-
-
Just .
-
Download and place the folder in the environment.
-
-
justis a command runner, similar tomake, but with a more modern and simplified syntax. -
It has no language-specific knowledge like C, Rust, etc.
-
You define recipes in the
justfile, which are basically terminal commands to execute. -
For C projects,
makeor more specialized tools likeCMakeorMesonprovide features like:-
Dependency detection.
-
Incremental compilation.
-
Cross-platform support.
-
-
justis more useful when you want a simple file to organize reusable commands (build, run, test, etc.), without dependency logic between files. -
Tutorial :
-
The file must be named
justfile, without extension.
recipe-name: echo 'This is a recipe!' # this is a comment another-recipe: @echo 'This is another recipe.'-
Running
justwith no arguments runs the first recipe in thejustfile. -
One or more arguments specify the recipe(s) to run.
-
Recipes can depend on other recipes. Here the
testrecipe depends on thebuildrecipe, sobuildwill run beforetest:build: cc main.c foo.c bar.c -o main test: build ./test sloc: @echo "`wc -l *.c` lines of code" -
Recipes without dependencies run in the order given on the command line:
$ just build sloc cc main.c foo.c bar.c -o main 1337 lines of code
-
Batch
-
.
Ninja
-
Ninja .
-
"Focus on speed".
-
Less flexibility.
-
"It's designed to have its input files generated by a higher-level build system".
-
So don’t use it alone; have something generate Ninja files using a Meta Build System, like CMake.
-
Not designed to be written manually.
-
-
My version :
-
1.12.1.
-
-
-
Ninja vs CMake doesn’t make sense, but Ninja WITH CMake does; it’s a good choice, especially for large projects.
-
GNU Make
-
-
-
Make has an absurdly more confusing syntax.
-
MSBuild / Visual Studio Project
-
Create a project, add files inside using the IDE, click Build Solution .
Disadvantages
-
Completely Windows-focused.
-
Using a VS project limits deployment targets.
-
"Technically possible to export to other platforms, but not easy."
-
-
Less Flexible.
-
You may not always be able to do or get what you want.
-
MSBuild
-
MSBuildis Microsoft’s default build engine for .NET, C++, and others. -
It interprets project files (
.vcxproj,.csproj) and executes build steps. -
Works via command line and is used internally by Visual Studio.
-
Visual Studio uses MSBuild internally when you click Build Solution.
-
Visual Studio does not compile directly – it calls MSBuild (or other systems like CMake).
Visual Studio solution generated by CMake
-
The projects
install,ALL_BUILD, andZERO_CHECKare defaults when CMake generates solutions for Visual Studio. -
ALLBUILD
-
Function: Project that depends on all other projects created by CMake, except
INSTALLandZEROCHECK. -
Used to: Build all defined targets (executables, libraries, etc.) at once.
-
Behavior: Compiling
ALLBUILDbuilds everything configured in CMake.
-
-
ZEROCHECK
-
Function: Ensures CMake reconfigures the project if CMakeLists.txt files change.
-
Used to: Automate regeneration of project files when build configuration changes.
-
Behavior: Runs automatically before any build, unless disabled.
-
-
INSTALL
-
Function: Executes rules defined by
install(...)commands in CMakeLists.txt. -
Used to: Copy binaries, headers, libraries, etc., to defined directories (like
/usr/localor aninstallfolder). -
Behavior: Only makes sense if the CMake script has installation instructions.
-
Bazel
-
From Google.
-
For multiple languages: Java, C++, Go, etc.
-
Requirements :
-
Bazelisk.
-
-
-
User experience was kind of messy.
-
Gradle
-
Java/Kotlin.
-
Build manager for the JVM (Android, Java, etc.).
XCodeBuild
-
Build tool for macOS/iOS projects (Xcode).