HomePhabricator

[cmake] Limit missing external lit warning to be shown once

Authored by kastiglione on Oct 13 2020, 5:50 PM.

Description

[cmake] Limit missing external lit warning to be shown once

When using a custom LLVM_EXTERNAL_LIT, it's possible the file may not exist at the CMake is generating the build. One example is LLDB standalone builds. When the external lit doesn't exist, a warning message is emitted, but the warning is printed once for every single lit target. This produces many redundant warnings.

This changes the warning to only be emitted once, controlled by a CACHE variable.

Other options are:

  1. remove the warning
  2. have callers pass an option to silence the warning if desired

See https://reviews.llvm.org/D76945 for some context.

Differential Revision: https://reviews.llvm.org/D89356

Details