[cmake] Properly support target properties.
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Mon, 16 Aug 2021 00:05:25 +0000 (17:05 -0700)
committerStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Tue, 17 Aug 2021 21:08:21 +0000 (14:08 -0700)
commitaf7818093677dcb4c0840aef96bc029deb219e57
tree2f527408404d9696f78bd2d89321395d7a51b7c3
parentd52f0aeca5dbde61aadbcd20e1b8cfaf15a84a65
[cmake] Properly support target properties.

It's sometimes useful to use these directives when dealing with
external projects:
target_link_directories
target_link_libraries
target_include_directories

However, under certain circumstances,
llvm_add_library can generate multiple targets.  We need to transfer
these properties to the new targets.  Note that using a generator
expression is necessary because these properties will only be set
after llvm_add_library is called.

Differential Revision: https://reviews.llvm.org/D108098
llvm/cmake/modules/AddLLVM.cmake