diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 89a28302..8a3d5f5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,7 @@ CMAKE_DEPENDENT_OPTION( BUILD_DOC_DIST "Create distribution of manual" ON "BUILD_DOC_PDF;BUILD_DOC_HTML" OFF) +option(ENABLE_COVERAGE "Enable coverage reporting" OFF) option(BUILD_SHARED_LIBS "Build qpdf shared libraries" ON) option(BUILD_STATIC_LIBS "Build qpdf static libraries" ON) option(QTEST_COLOR "Whether qtest's output should be in color" ON) @@ -296,6 +297,11 @@ set(CPACK_RESOURCE_FILE_LICENSE "${qpdf_SOURCE_DIR}/LICENSE.txt") set(CPACK_PACKAGE_HOMEPAGE_URL "https://qpdf.sourceforge.io/") set(CPACK_NSIS_MUI_ICON "${qpdf_SOURCE_DIR}/logo/qpdf.ico") +if(ENABLE_COVERAGE) + add_compile_options(--coverage -O0) + add_link_options(--coverage) +endif() + include(CPack) # Install components -- documented in _installation in |