[PATCH] D58317: [clang] Add install targets for library headers

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 20 17:19:43 PST 2019


smeenai updated this revision to Diff 187697.
smeenai added a comment.

Switch to clang-library-headers pending cfe-dev discussion


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58317/new/

https://reviews.llvm.org/D58317

Files:
  clang/CMakeLists.txt


Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -388,6 +388,7 @@
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/clang include/clang-c
     DESTINATION include
+    COMPONENT clang-library-headers
     FILES_MATCHING
     PATTERN "*.def"
     PATTERN "*.h"
@@ -397,12 +398,23 @@
 
   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang
     DESTINATION include
+    COMPONENT clang-library-headers
     FILES_MATCHING
     PATTERN "CMakeFiles" EXCLUDE
     PATTERN "*.inc"
     PATTERN "*.h"
     )
 
+  # Installing the headers needs to depend on generating any public
+  # tablegen'd headers.
+  add_custom_target(clang-library-headers DEPENDS clang-tablegen-targets)
+  set_target_properties(clang-library-headers PROPERTIES FOLDER "Misc")
+  if(NOT LLVM_ENABLE_IDE)
+    add_llvm_install_targets(install-clang-library-headers
+                             DEPENDS clang-library-headers
+                             COMPONENT clang-library-headers)
+  endif()
+
   install(PROGRAMS utils/bash-autocomplete.sh
     DESTINATION share/clang
     )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58317.187697.patch
Type: text/x-patch
Size: 1177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190221/0d47458e/attachment.bin>


More information about the cfe-commits mailing list