[PATCH] D109019: [CMake] Add targets for generating coverage reports
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 2 16:16:28 PDT 2021
phosek added inline comments.
================
Comment at: llvm/cmake/modules/CoverageReport.cmake:18
+if(NOT LLVM_COV OR NOT LLVM_PROFDATA)
+ message(WARNING "Could not find code coverage tools, skipping generating targets. You may explicitly specify LLVM_COV and LLVM_PROFDATA to work around this warning.")
+ return()
----------------
beanz wrote:
> phosek wrote:
> > Have you considered using `SEND_ERROR`? I'm worried that people might miss the warning and then become surprised when they don't get coverage so I'd slightly prefer error over warning.
> `LLVM_BUILD_INSTRUMENTED_COVERAGE` works with `gcc` and `gcov`, but the python script in our repo doesn't. So I wanted to only generate these targets if you have `llvm-cov` and `llvm-profdata`, but I don't want it to be fatal if you don't.
>
> I felt like a warning would get a little more attention than a note or generic message if something went wrong, but not fail the build configuration.
>
> Does that make sense?
That makes sense, I wasn't aware that `gcc` and `gcov` is also supported.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109019/new/
https://reviews.llvm.org/D109019
More information about the llvm-commits
mailing list