gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
92 stars 8 forks source link

Demonstrate code coverage support #1012

Open lacasseio opened 5 years ago

lacasseio commented 5 years ago

Code coverage tools require different compiler/linker flags and most likely a different workflow for executing the code for coverage calculation. Let's demonstrate how this can be achieved with Gradle.

A clear recurrent pattern is generating additional variants (on top of the one for building) which is currently absent from Gradle. The variant handling will have to be ad-hoc.

lacasseio commented 5 years ago

It was noted this use case is common among software model users and block users from moving to the new C++ plugins.

lacasseio commented 5 years ago

GCC's gcov and then lcov to render an HTML report for the coverage is one of the use case.

k-mack commented 5 years ago

Even a sample that shows how to create any variant outside of the ones created automatically (e.g., debugLinuxX86-64) would be great.