Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

More generic and maintainable makefile. Fixes #348

- implicit recipes
- wildcard glob of C++ files in directory
Commit
aaa1970a06960bc3a05865f28c4ad8ef6514bea3
Author
Jamie Bullock ·
Parents
81fc6d71112e

Files · Download .tar.gz

Changes

 projects/SelfTest/makefile | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/projects/SelfTest/makefile b/projects/SelfTest/makefile
index 8c72c076..f828c526 100644
--- a/projects/SelfTest/makefile
+++ b/projects/SelfTest/makefile
@@ -1,21 +1,14 @@
-SOURCES =	ApproxTests.cpp \
-			ClassTests.cpp \
-			ConditionTests.cpp \
-      		ExceptionTests.cpp \
-      		GeneratorTests.cpp \
-      		MessageTests.cpp \
-      		MiscTests.cpp \
-      		TestMain.cpp \
-      		TrickyTests.cpp \
-      		BDDTests.cpp \
-      		VariadicMacrosTests.cpp \
 
-OBJECTS    = $(patsubst %.cpp, %.o, $(SOURCES))
+EXEC=CatchSelfTest
+SOURCES = $(wildcard *.cpp)
+OBJECTS = $(SOURCES:.cpp=.o)
+
 CXX = g++
-CXXFLAGS  = -I../../include
+CXXFLAGS  = -I../../include -I../../include/internal
 
-CatchSelfTest: $(OBJECTS)
+$(EXEC): $(OBJECTS)
 	$(CXX) -o $@ $^
 
 clean:
-	rm -f $(OBJECTS)
+	$(RM) $(OBJECTS)
+	$(RM) $(EXEC)