[PATCH] D109019: [CMake] Add targets for generating coverage reports

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 2 11:02:05 PDT 2021


beanz 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()
----------------
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?


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