Skip to content

Commit

Permalink
chore: exclude system directories from coverage (#68)
Browse files Browse the repository at this point in the history
* chore: exclude system directories from coverage

* docs: typo changelog
  • Loading branch information
msclock authored Mar 14, 2024
1 parent 7e063b7 commit 776cc8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
### Build

* optimize cmake tool file load ([#61](https://github.com/serious-scaffold/ss-cpp/issues/61)) ([f44a4b2](https://github.com/serious-scaffold/ss-cpp/commit/f44a4b2aa51a8a16dd34f3d46566b3bb8f94465a))
* optimze build ([#60](https://github.com/serious-scaffold/ss-cpp/issues/60)) ([b99bd6b](https://github.com/serious-scaffold/ss-cpp/commit/b99bd6b83d16d4a7a816db4cb825a925247b0855))
* optimize build ([#60](https://github.com/serious-scaffold/ss-cpp/issues/60)) ([b99bd6b](https://github.com/serious-scaffold/ss-cpp/commit/b99bd6b83d16d4a7a816db4cb825a925247b0855))
* simplify CMakePresets.json ([#62](https://github.com/serious-scaffold/ss-cpp/issues/62)) ([2172148](https://github.com/serious-scaffold/ss-cpp/commit/2172148cf30da79bb8e4e707133684c87c64c9d7))


Expand Down
5 changes: 3 additions & 2 deletions cmake/ConfigureCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ include_guard(GLOBAL)
include(cmake-modules/test/Coverage)
list(APPEND _excludes "${CMAKE_BINARY_DIR}" "${VCPKG_INSTALLED_DIR}")

if(UNIX)
list(APPEND _excludes "/usr" "/usr/local" "/opt" "/opt/local")
# Exclude system directories from code coverage
if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
list(APPEND _excludes "/usr" "/opt" "/opt/local")
endif()

add_code_coverage_all_targets(
Expand Down
5 changes: 3 additions & 2 deletions template/cmake/ConfigureCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ include_guard(GLOBAL)
include(cmake-modules/test/Coverage)
list(APPEND _excludes "${CMAKE_BINARY_DIR}" "${VCPKG_INSTALLED_DIR}")

if(UNIX)
list(APPEND _excludes "/usr" "/usr/local" "/opt" "/opt/local")
# Exclude system directories from code coverage
if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
list(APPEND _excludes "/usr" "/opt" "/opt/local")
endif()

add_code_coverage_all_targets(
Expand Down

0 comments on commit 776cc8f

Please sign in to comment.