Skip to content

Commit

Permalink
[circle-mlir] Introduce cirmlir_coverage interface (#14661)
Browse files Browse the repository at this point in the history
This will introduce cirmlir_coverage CMake interface for test coverage
report generation.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Feb 13, 2025
1 parent e71debb commit 869d08e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions circle-mlir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ endif()
# configuration flags
include(CfgOptionFlags)

# enable test coverage
include(TestCoverage)

# enable ctest
include(CTest)

Expand Down
5 changes: 5 additions & 0 deletions circle-mlir/infra/cmake/TestCoverage.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_library(cirmlir_coverage INTERFACE)
if(ENABLE_COVERAGE)
target_compile_options(cirmlir_coverage INTERFACE -g -O0 -fprofile-arcs -ftest-coverage)
target_link_libraries(cirmlir_coverage INTERFACE gcov)
endif()

0 comments on commit 869d08e

Please sign in to comment.