Add CRYPTOPP_COVERAGE define for 'make coverage' recipe

pull/416/head
Jeffrey Walton 2017-05-04 03:01:07 -04:00
parent 7131a0fbb8
commit 9614307ab7
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 4 additions and 1 deletions

View File

@ -436,6 +436,9 @@ endif # Gold
# GCC code coverage. Issue 'make coverage'.
ifneq ($(filter coverage,$(MAKECMDGOALS)),)
ifeq ($(findstring -DCRYPTOPP_COVERAGE,$(CXXFLAGS)),)
CXXFLAGS += -DCRYPTOPP_COVERAGE
endif # -coverage
ifeq ($(findstring -coverage,$(CXXFLAGS)),)
CXXFLAGS += -coverage
endif # -coverage
@ -574,7 +577,7 @@ coverage: libcryptopp.a cryptest.exe
./cryptest.exe v
./cryptest.exe tv all
lcov --base-directory . --directory . -c -o cryptest.info
lcov --remove cryptest.info "*test.*" "bench*.cpp" "validat*.*" "/usr/*" -o cryptest.info
lcov --remove cryptest.info "fips140.*" "*test.*" "bench*.cpp" "validat*.*" "/usr/*" -o cryptest.info
genhtml -o ./TestCoverage/ -t "cryptest.exe test coverage" --num-spaces 4 cryptest.info
.PHONY: test check