[llvm] r350959 - [CMake] Export utility targets to the build/install tree depending on LLVM_BUILD/INSTALL_UTILS
Stefan Granitz via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 11 11:34:34 PST 2019
Author: stefan.graenitz
Date: Fri Jan 11 11:34:34 2019
New Revision: 350959
URL: http://llvm.org/viewvc/llvm-project?rev=350959&view=rev
Log:
[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
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=350959&r1=350958&r2=350959&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Fri Jan 11 11:34:34 2019
@@ -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)
More information about the llvm-commits
mailing list