Fix tests to use CXX compiler and fail if valgrind detects leak

This commit is contained in:
Josh Holtrop 2026-02-23 21:29:55 -05:00
parent fac82eaaad
commit 13c7832c4b

View File

@ -3,11 +3,11 @@ INCLUDE := ../include
.PHONY: all .PHONY: all
all: build/tests all: build/tests
build/tests build/tests
valgrind -q build/tests valgrind --leak-check=full --error-exitcode=1 --log-file=build/valgrind.log build/tests
build/tests: tests.cpp $(INCLUDE)/rcp.h build/tests: tests.cpp $(INCLUDE)/rcp.h
mkdir -p $$(dirname $@) mkdir -p $$(dirname $@)
$(CC) -std=c++20 -g -Wall -I$(INCLUDE) -o $@ $< $(CXX) -std=c++20 -g -Wall -I$(INCLUDE) -o $@ $<
.PHONY: clean .PHONY: clean
clean: clean: