r284658 - [cmake] Follow LLVM's lead in creating exported tool targets for clang tools.
Michael Gottesman via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 15:46:07 PDT 2016
Author: mgottesman
Date: Wed Oct 19 17:46:06 2016
New Revision: 284658
URL: http://llvm.org/viewvc/llvm-project?rev=284658&view=rev
Log:
[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.
Modified:
cfe/trunk/cmake/modules/AddClang.cmake
Modified: cfe/trunk/cmake/modules/AddClang.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/modules/AddClang.cmake?rev=284658&r1=284657&r2=284658&view=diff
==============================================================================
--- cfe/trunk/cmake/modules/AddClang.cmake (original)
+++ cfe/trunk/cmake/modules/AddClang.cmake Wed Oct 19 17:46:06 2016
@@ -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()
More information about the cfe-commits
mailing list