This patch moves all the clang library targets into a ClangTargets export list, and installs it using the CMake install(EXPORT...) command.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Stephen Kelly's comments in the bug (https://llvm.org/bugs/show_bug.cgi?id=19462) from 2015-02-25 indicate that these patches are fine as-is.
He also recommends we may want to consider namespacing our LLVM and Clang targets in our exported target files. According to the CMake documentation (http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html):
"A NAMESPACE with double-colons is specified when exporting the targets for installation. This convention of double-colons gives CMake a hint that the name is an IMPORTED target when it is used by downstreams with the target_link_libraries() command. This way, CMake can issue a diagnostic if the package providing it has not yet been found."
This might be desirable, however it will require more testing.
Does anyone have any objection to these patches as they are now?