Skip to content

Instantly share code, notes, and snippets.

@rowlo
Last active February 8, 2021 06:44
Show Gist options
  • Save rowlo/5857129 to your computer and use it in GitHub Desktop.
Save rowlo/5857129 to your computer and use it in GitHub Desktop.
Enableing lcov code coverage analysis in QtCreator project file.
QMAKE_CXXFLAGS += -g -Wall -fprofile-arcs -ftest-coverage -O0
QMAKE_LFLAGS += -g -Wall -fprofile-arcs -ftest-coverage -O0
LIBS += \
-lgcov
@elephantenlein
Copy link

--coverage does all the same as -fprofile-arcs and -ftest-coverage, so is preferred

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment