From 53be475db91c754d49ffa39fd5070680b621b073 Mon Sep 17 00:00:00 2001 From: Mikael Salson Date: Fri, 17 Mar 2017 09:27:08 +0100 Subject: [PATCH] Makefile: Improve test speeds Tests were launched with -O0 option to make debugging easier, in particular with gdb but also possibly with Valgrind. However this induces a large time penaly. As we want to improve test speeds (#2254), it should be a good idea to use -O2. Note that we do not compile with -DNDEBUG, which would improve speed test only slightly. It is important that assertions are tested. Unit and functional tests are the perfect place for that. --- algo/tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algo/tests/Makefile b/algo/tests/Makefile index 15dbf06a1..764d744fb 100644 --- a/algo/tests/Makefile +++ b/algo/tests/Makefile @@ -1,6 +1,6 @@ CXX?=g++ INCLUDE=-I .. -OPTIM=-g -O0 $(COVERAGE) +OPTIM=-g -O2 $(COVERAGE) override CXXFLAGS += -std=c++11 -W -Wall $(OPTIM) LDLIBS=-lz SRC= unit-tests/tests.cpp -- GitLab