[cmake] Synthesize clang-headers target if it's missing

... not depending on a potentially-incidental condition.
This commit is contained in:
Kim Gräsman 2022-02-28 20:46:53 +01:00
parent 226efb43ad
commit 9c15de6da6
1 changed files with 2 additions and 3 deletions

View File

@ -36,9 +36,8 @@ option(IWYU_LINK_CLANG_DYLIB
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Synthesize a clang-resource-headers target for out-of-tree builds (in-tree
# already has it available by default)
if (NOT IWYU_IN_TREE)
# Synthesize clang-resource-headers target if necessary.
if (NOT TARGET clang-resource-headers)
# Use only major.minor.patch for the resource directory structure; some
# platforms include suffix in LLVM_VERSION.
set(llvm_ver