[PATCH] D58862: [cmake] Create exports for umbrella library targets
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 18:13:27 PST 2019
smeenai created this revision.
smeenai added reviewers: beanz, phosek.
Herald added a subscriber: mgorny.
Herald added projects: clang, LLVM.
When using the umbrella llvm-libraries and clang-libraries targets, we
should export all library targets, otherwise they'll be part of our
distribution but not usable from the CMake package.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D58862
Files:
clang/cmake/modules/AddClang.cmake
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -633,6 +633,7 @@
# config file.
if (NOT ARG_BUILDTREE_ONLY AND NOT ARG_MODULE)
set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} )
+ set(in_llvm_libs YES)
endif()
if (ARG_MODULE AND NOT TARGET ${name})
@@ -663,6 +664,7 @@
endif()
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+ (in_llvm_libs AND "llvm-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS) OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
set(export_to_llvmexports EXPORT LLVMExports)
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
Index: clang/cmake/modules/AddClang.cmake
===================================================================
--- clang/cmake/modules/AddClang.cmake
+++ clang/cmake/modules/AddClang.cmake
@@ -91,6 +91,7 @@
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+ "clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
set(export_to_clangtargets EXPORT ClangTargets)
set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58862.189019.patch
Type: text/x-patch
Size: 1329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190302/a0b0f296/attachment.bin>
More information about the cfe-commits
mailing list