summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-06-06 13:58:22 +0200
committerRoland Reichwein <mail@reichwein.it>2020-06-06 13:58:22 +0200
commitd0db131a73933d0a6c65bab59d1e0e4f6a185338 (patch)
tree06edad4d845c8ba4102843fc3b306d7b5cc485d6 /tests
parent343922258d57261021daca42eb488c1205ae491c (diff)
Code cleanup, use gcc 8 on debian 10
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile57
1 files changed, 5 insertions, 52 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 2bccae4..2f0e809 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,35 +1,8 @@
-DISTROS=debian10 ubuntu1910 ubuntu2004
-PROJECTNAME=test-webserver
-
-CXX=clang++-10
-
-ifeq ($(shell which $(CXX)),)
-CXX=clang++
-endif
-
-ifeq ($(shell which $(CXX)),)
-CXX=g++-9
-endif
+include ../common.mk
-ifeq ($(shell which $(CXX)),)
-CXX=g++
-endif
-
-ifeq ($(CXXFLAGS),)
-#CXXFLAGS=-O2 -DNDEBUG
-CXXFLAGS=-O0 -g -D_DEBUG
-endif
-# -fprofile-instr-generate -fcoverage-mapping
-# gcc:--coverage
-
-CXXFLAGS+= -Wall -I. -fPIE
+PROJECTNAME=test-webserver
-CXXFLAGS+= -pthread
-ifeq ($(CXX),clang++-10)
-CXXFLAGS+=-std=c++20 #-stdlib=libc++
-else
-CXXFLAGS+=-std=c++17
-endif
+CXXFLAGS+= -I. -fPIE
CXXTESTFLAGS=-I../googletest/include -I../googlemock/include/ -I../googletest -I../googlemock
@@ -44,25 +17,6 @@ LIBS=\
-lssl -lcrypto \
-ldl
-#-lboost_coroutine \
-#-lboost_program_options \
-#-lboost_thread \
-#-lboost_regex \
-
-ifeq ($(CXX),clang++-10)
-LIBS+= \
--fuse-ld=lld-10 \
--lstdc++
-#-lc++ \
-#-lc++abi
-#-lc++fs
-#-lstdc++fs
-else
-LIBS+= \
--lstdc++ \
--lstdc++fs
-endif
-
LDFLAGS+=-pie -L../libcommon
TESTSRC=\
@@ -104,9 +58,8 @@ install:
# misc ---------------------------------------------------
clean:
- -rm -f $(PROJECTNAME)
- -find . -name '*.o' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f
+ -rm -f *.o *.a *.d $(PROJECTNAME)
-.PHONY: clean all install all $(DISTROS)
+.PHONY: clean all install
-include $(wildcard $(TESTSRC:.cpp=.d))