From d09157ce83450b176ddb92466a782d9c8bb6a846 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sat, 27 Apr 2024 08:00:54 -0400 Subject: [PATCH] xo-unit: build: streamline using xo_utest_coverage_config2() --- docs/CMakeLists.txt | 1 + utest/CMakeLists.txt | 39 --------------------------------------- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 5f13ecd9..403cc2af 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -7,3 +7,4 @@ xo_docdir_sphinx_config( quantity-reference.rst quantity-class.rst quantity-factoryfunctions.rst quantity-unitvars.rst unit-reference.rst unit-concept.rst unit-quantities.rst ) +xo_utest_coverage_config2() diff --git a/utest/CMakeLists.txt b/utest/CMakeLists.txt index 347d649f..cce4b538 100644 --- a/utest/CMakeLists.txt +++ b/utest/CMakeLists.txt @@ -8,45 +8,6 @@ set(SELF_SOURCE_FILES xo_add_utest_executable(${SELF_EXECUTABLE_NAME} ${SELF_SOURCE_FILES}) -# ---------------------------------------------------------------- -# in coverage build, target to build+install coverage report - -if (XO_SUBMODULE_BUILD) - # in submodule build, generate aggregate coverage report - # for all xo libraries -else() - set(CCOV_OUTPUT_DIR ${PROJECT_BINARY_DIR}/ccov/html) - set(CCOV_INDEX_FILE ${CCOV_OUTPUT_DIR}/index.html) - set(CCOV_REPORT_EXE ${PROJECT_BINARY_DIR}/gen-ccov) - # CMAKE_INSTALL_DOCDIR - # =default=> DATAROOTDIR/doc/PROJECT_NAME - # =default=> CMAKE_INSTALL_PREFIX/share/doc/xo_flatstring - set(CCOV_INSTALL_DOCDIR ${CMAKE_INSTALL_DOCDIR}/ccov) - - # 'test' target should always be out-of-date - # - # DEPENDS: reminder - can't put 'test' here, requires 'all' target - # - add_custom_command( - OUTPUT ${CCOV_INDEX_FILE} - DEPENDS ${SELF_EXE} - COMMAND ${CCOV_REPORT_EXE} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - COMMENT "Generating coverage report -> [${CCOV_OUTPUT_DIR}]") - - add_custom_target( - ccov - DEPENDS ${CCOV_INDEX_FILE} ${SELF_EXE}) - - # OPTIONAL: quietly skip this step if ccov report not generated - install( - DIRECTORY ${CCOV_OUTPUT_DIR} - FILE_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ - DESTINATION ${CCOV_INSTALL_DOCDIR} - COMPONENT Documentation - OPTIONAL) -endif() - # ---------------------------------------------------------------- # dependencies..