summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Granitz <stefan.graenitz@gmail.com>2019-01-11 19:34:34 +0000
committerStefan Granitz <stefan.graenitz@gmail.com>2019-01-11 19:34:34 +0000
commit5068fc31f28b903898ea07648200360490f3b26d (patch)
tree4c063ba8dfceb144de9978733eee3213f7493022
parentdb8fac140ea522bfd5153adb407c60f605f3277b (diff)
downloadbcm5719-llvm-5068fc31f28b903898ea07648200360490f3b26d.tar.gz
bcm5719-llvm-5068fc31f28b903898ea07648200360490f3b26d.zip
[CMake] Export utility targets to the build/install tree depending on LLVM_BUILD/INSTALL_UTILS
Summary: Allow external projects to import test-related targets like FileCheck, count, not etc. and query binary paths, properties, etc. This would be useful for LLDB, because it reduces the difference between in-tree vs. standalone builds and simplifies CMake logic. Reviewers: chapuni, gottesmm, beanz Reviewed By: beanz Subscribers: mgorny, lldb-commits, llvm-commits, #lldb Differential Revision: https://reviews.llvm.org/D56606 llvm-svn: 350959
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 9b7d24184fe..4dbc0ddaf4f 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -920,6 +920,9 @@ macro(add_llvm_utility name)
DEPENDS ${name}
COMPONENT ${name})
endif()
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ elseif( LLVM_BUILD_UTILS )
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name})
endif()
endmacro(add_llvm_utility name)
OpenPOWER on IntegriCloud