chore(cpp): support catch for tests

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2023-07-09 22:40:25 +02:00
parent 6f4eb98203
commit 12ffad5a8b
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -1,8 +1,11 @@
CXX=clang++ CXX=clang++
CXXFLAGS=-std=c++20 -Wall -Wextra CXXFLAGS=-std=c++20 -Wall -Wextra
%: format %.cpp catch2.o: ../.common/catch_amalgamated.cpp ../.common/catch_amalgamated.hpp
$(CXX) $(CXXFLAGS) -g $^ -o $@ $(CXX) $(CXXFLAGS) -g -c ../.common/catch_amalgamated.cpp -o catch2.o
%: catch2.o %.cpp
$(CXX) $(CXXFLAGS) -DTEST -g $^ -o $@
format: format:
clang-format -i -style=google *.cpp clang-format -i -style=google *.cpp