Skip to content

Instantly share code, notes, and snippets.

@dadencukillia
Last active July 5, 2025 14:13
Show Gist options
  • Save dadencukillia/266a26628a428fbb7dffae0fdcffe5e9 to your computer and use it in GitHub Desktop.
Save dadencukillia/266a26628a428fbb7dffae0fdcffe5e9 to your computer and use it in GitHub Desktop.
Makefile: CMake launcher
EXECUTABLE := out
GENERATOR := Ninja
.DEFAULT_GOAL := all
.SILENT: run
all: configure compile run
clear:
rm -rf ./build
configure:
cmake -S. -B=build -G=${GENERATOR}
compile:
cmake --build build -j 8
run:
echo
echo ---- PROGRAM OUTPUT: ----
./build/${EXECUTABLE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment