Skip to content

Commit

Permalink
[cmake] update for coverage test
Browse files Browse the repository at this point in the history
  • Loading branch information
lvntky committed Aug 9, 2024
1 parent 82212ca commit 88dc192
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ project(
LANGUAGES NONE
)


# Add coverage flags if the build type is Coverage
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(--coverage)
link_libraries(--coverage)
endif()
endif()


include(cmake/variables.cmake)

# ---- Declare library ----
Expand Down

0 comments on commit 88dc192

Please sign in to comment.