[CMake] Use PUBLIC link mode for static libraries
authorPetr Hosek <phosek@google.com>
Thu, 6 Feb 2020 03:07:43 +0000 (19:07 -0800)
committerPetr Hosek <phosek@google.com>
Sat, 29 Feb 2020 19:05:59 +0000 (11:05 -0800)
commit50a6d3a6486d81d21a2c31ce8522321e19bed35e
treea4a82f17c58333190afe667d01b29731228b4d10
parent7e9747b50bcb1be28d4a3236571e8050835497a6
[CMake] Use PUBLIC link mode for static libraries

Using INTERFACE prevents the use of imported libraries as we've done
in 00b3d49 because these aren't linked against the target, they're
only made part of the interface. This doesn't affect the output since
static libraries aren't being linked into, but it enables the use of
imported libraries.

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