build: add Makefile wrapping cmake/ctest workflow
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6990bff809
commit
2e9687965d
24
Makefile
Normal file
24
Makefile
Normal 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)
|
||||||
Loading…
x
Reference in New Issue
Block a user