summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2016-10-19 22:46:06 +0000
committerMichael Gottesman <mgottesman@apple.com>2016-10-19 22:46:06 +0000
commit57c31dd611eab528c5d16c7d721e44697bb9e460 (patch)
tree19df4dd8c278c947308ddb67a494d4bf9ec4f868 /cmake
parenteff4af405363ef21e9ad401062e177f793e2abd9 (diff)
[cmake] Follow LLVM's lead in creating exported tool targets for clang tools.
This is needed by downstream projects such as swift to get proper cmake dependency information for LLVM/Clang targets. A few months ago I added support for exporting this information for Clang libraries. In order to be incremental, I did not add support for exporting clang tools as well at that time. Now such support is needed, so I am committing this incremental code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/AddClang.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
index 6e063a706b..88ee1f71ed 100644
--- a/cmake/modules/AddClang.cmake
+++ b/cmake/modules/AddClang.cmake
@@ -139,6 +139,7 @@ macro(add_clang_tool name)
-DCMAKE_INSTALL_COMPONENT=${name}
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
endif()
+ set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
endif()
endmacro()