[PATCH] D58269: [clang] Add build and install targets for clang libraries

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 15 07:59:53 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rC354141: [clang] Add build and install targets for clang libraries (authored by smeenai, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D58269?vs=186957&id=187019#toc

Repository:
  rC Clang

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

https://reviews.llvm.org/D58269

Files:
  CMakeLists.txt
  cmake/modules/AddClang.cmake


Index: cmake/modules/AddClang.cmake
===================================================================
--- cmake/modules/AddClang.cmake
+++ cmake/modules/AddClang.cmake
@@ -108,6 +108,8 @@
                                  DEPENDS ${name}
                                  COMPONENT ${name})
       endif()
+
+      set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${name})
     endif()
     set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
   else()
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -543,6 +543,27 @@
   add_subdirectory(docs)
 endif()
 
+# Custom target to install all clang libraries.
+add_custom_target(clang-libraries)
+set_target_properties(clang-libraries PROPERTIES FOLDER "Misc")
+
+if(NOT CMAKE_CONFIGURATION_TYPES)
+  add_llvm_install_targets(install-clang-libraries
+                           DEPENDS clang-libraries
+                           COMPONENT clang-libraries)
+endif()
+
+get_property(CLANG_LIBS GLOBAL PROPERTY CLANG_LIBS)
+if(CLANG_LIBS)
+  list(REMOVE_DUPLICATES CLANG_LIBS)
+  foreach(lib ${CLANG_LIBS})
+    add_dependencies(clang-libraries ${lib})
+    if(NOT CMAKE_CONFIGURATION_TYPES)
+      add_dependencies(install-clang-libraries install-${lib})
+    endif()
+  endforeach()
+endif()
+
 add_subdirectory(cmake/modules)
 
 if(CLANG_STAGE)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58269.187019.patch
Type: text/x-patch
Size: 1381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190215/aad06255/attachment.bin>


More information about the cfe-commits mailing list