Skip to content

Commit

Permalink
Quick example for public/interface public coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
StableCoder committed Apr 25, 2020
1 parent 5f42869 commit 3d2d5a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions example/code-coverage-public/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.13)
project(test C)

include(../../code-coverage.cmake)

add_library(head INTERFACE)
target_code_coverage(head INTERFACE)

add_executable(test code.c)
target_link_libraries(test PRIVATE head)
# target_code_coverage(test)
3 changes: 3 additions & 0 deletions example/code-coverage-public/code.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "header.h"

int main() { return func(); }
1 change: 1 addition & 0 deletions example/code-coverage-public/header.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int func() { return 0; }

0 comments on commit 3d2d5a9

Please sign in to comment.