summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/TableGen.cmake
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2016-11-04 21:55:23 +0000
committerJustin Bogner <mail@justinbogner.com>2016-11-04 21:55:23 +0000
commit4ce3e0c31ad6e40ee744fb879eeed2d3f3d0162a (patch)
tree48f086790ea8892bbf2cb25b20bb6faca23904bb /llvm/cmake/modules/TableGen.cmake
parent7c6d289d66dfc1c1b489783f1496623dadfe36a8 (diff)
downloadbcm5719-llvm-4ce3e0c31ad6e40ee744fb879eeed2d3f3d0162a.tar.gz
bcm5719-llvm-4ce3e0c31ad6e40ee744fb879eeed2d3f3d0162a.zip
cmake: When using LLVM_DISTRIBUTION_COMPONENTS, adjust LLVMExports accordingly
This Makes sure we only export targets that we're distributing, since cmake will fail to import the file otherwise due to missing targets. llvm-svn: 286024
Diffstat (limited to 'llvm/cmake/modules/TableGen.cmake')
-rw-r--r--llvm/cmake/modules/TableGen.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake
index c9cfb37f8d2..a366299ab49 100644
--- a/llvm/cmake/modules/TableGen.cmake
+++ b/llvm/cmake/modules/TableGen.cmake
@@ -137,8 +137,13 @@ macro(add_tablegen target project)
endif()
if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+ NOT LLVM_DISTRIBUTION_COMPONENTS)
+ set(export_to_llvmexports EXPORT LLVMExports)
+ endif()
+
install(TARGETS ${target}
- EXPORT LLVMExports
+ ${export_to_llvmexports}
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})
endif()
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})
OpenPOWER on IntegriCloud