Skip to content
Merged
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
4 changes: 2 additions & 2 deletions code-coverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function(target_code_coverage TARGET_NAME)
elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES
"GNU")
target_compile_options(${TARGET_NAME} ${TARGET_VISIBILITY} -fprofile-arcs
-ftest-coverage)
-ftest-coverage -fno-elide-constructors -fno-default-inline)
target_link_libraries(${TARGET_NAME} ${TARGET_LINK_VISIBILITY} gcov)
endif()

Expand Down Expand Up @@ -501,7 +501,7 @@ function(add_code_coverage)
add_link_options(-fprofile-instr-generate -fcoverage-mapping)
elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES
"GNU")
add_compile_options(-fprofile-arcs -ftest-coverage)
add_compile_options(-fprofile-arcs -ftest-coverage -fno-elide-constructors -fno-default-inline)
link_libraries(gcov)
endif()
endif()
Expand Down