From 7f567810387df1c82d00f602700e36efe5226f50 Mon Sep 17 00:00:00 2001 From: lexus2k Date: Thu, 25 Jul 2024 23:27:02 +0400 Subject: [PATCH] Unittests fix #45 --- Makefile.cpputest | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.cpputest b/Makefile.cpputest index eb1fadfb..61d7cf8c 100644 --- a/Makefile.cpputest +++ b/Makefile.cpputest @@ -1,5 +1,9 @@ .PHONY: unittest check clean_unittest +CPPUTEST_HOME ?= /usr/local + +CXXFLAGS += -I$(CPPUTEST_HOME)/include -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED + OBJ_UNIT_TEST = \ unittest/helpers/fake_wire.o \ unittest/helpers/fake_connection.o \ @@ -16,8 +20,9 @@ OBJ_UNIT_TEST = \ unittest/fd_tests.o \ unittest/fd_multidrop_tests.o \ + unittest: $(OBJ_UNIT_TEST) library - $(CXX) $(CPPFLAGS) -o $(BLD)/unit_test $(OBJ_UNIT_TEST) -L$(BLD) -lm -pthread -ltinyprotocol -lCppUTest -lCppUTestExt + $(CXX) $(CPPFLAGS) -o $(BLD)/unit_test $(OBJ_UNIT_TEST) -L$(BLD) -L$(CPPUTEST_HOME)/lib -lm -pthread -ltinyprotocol -lCppUTest -lCppUTestExt check: unittest $(BLD)/unit_test