build: add Makefile wrapping cmake/ctest workflow

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilya Ashikhmin 2026-07-03 19:00:45 +02:00
parent 6990bff809
commit 2e9687965d

24
Makefile Normal file
View File

@ -0,0 +1,24 @@
BUILD_DIR ?= build
BIN := $(BUILD_DIR)/src/pipediagram
.PHONY: all configure build run sample test clean
all: build
configure:
cmake -S . -B $(BUILD_DIR) -G Ninja
build: configure
cmake --build $(BUILD_DIR)
run: build
./$(BIN)
sample: build
./$(BIN) --sample
test: build
ctest --test-dir $(BUILD_DIR) --output-on-failure
clean:
rm -rf $(BUILD_DIR)