Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,5 @@ jobs:
- name: Check coverage
uses: threeal/[email protected]
with:
excludes: |
build/*
src/main.cpp
fail-under-line: 80
excludes: build/*
fail-under-line: 100
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
cpmgetpackage(Catch2)
include("${Catch2_SOURCE_DIR}/extras/Catch.cmake")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage -fPIC -O0")
get_target_property(my_fibonacci_SOURCES my_fibonacci SOURCES)
add_executable(my_fibonacci_test test/sequence_test.cpp ${my_fibonacci_SOURCES})

get_target_property(my_fibonacci_INCLUDES my_fibonacci INCLUDE_DIRECTORIES)
target_include_directories(my_fibonacci_test PRIVATE ${my_fibonacci_INCLUDES})

target_link_libraries(my_fibonacci_test PRIVATE Catch2::Catch2WithMain)

add_executable(my_fibonacci_test test/sequence_test.cpp)
target_link_libraries(my_fibonacci_test PRIVATE my_fibonacci Catch2::Catch2WithMain)
target_check_warning(my_fibonacci_test)
target_compile_options(my_fibonacci_test PRIVATE --coverage -O0)
target_link_options(my_fibonacci_test PRIVATE --coverage)

catch_discover_tests(my_fibonacci_test)
endif()
endif()