Skip to content

Commit

Permalink
Require dependent GCOV flags
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <travis.collins@analog.com>
  • Loading branch information
tfcollins committed Dec 15, 2023
1 parent 9902e76 commit c55f0d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DTESTS=ON -DTESTS_DEBUG=ON -DTESTS_COVERAGE=ON
cmake .. -DTESTS=ON -DTESTS_DEBUG=ON -DTESTS_COVERAGE=ON -DWITH_GCOV=ON
make
make coverage
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,10 @@ if(TESTS)
enable_testing()
add_subdirectory(tests)
if(TESTS_COVERAGE)
if(NOT WITH_GCOV)
message(FATAL_ERROR "Coverage report generation only supported with WITH_GCOV also enabled")
endif()

if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
message(FATAL_ERROR "Coverage only supported on Linux")
endif()
Expand Down

0 comments on commit c55f0d6

Please sign in to comment.