[PATCH] D11697: [libcxx] Add "install-libcxx" target.

Eric Fiselier eric at efcs.ca
Fri Jul 31 15:34:10 PDT 2015


EricWF created this revision.
EricWF added reviewers: mclow.lists, danalbert, jroelofs.
EricWF added a subscriber: cfe-commits.

Currently you can't install libc++ from within the LLVM tree without installing all of LLVM. This patch adds an install rule for libc++.

http://reviews.llvm.org/D11697

Files:
  cmake/Modules/HandleLibCXXABI.cmake
  include/CMakeLists.txt
  lib/CMakeLists.txt

Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -134,6 +134,14 @@
   )
 
 install(TARGETS cxx
-  LIBRARY DESTINATION lib${LIBCXX_LIBDIR_SUFFIX}
-  ARCHIVE DESTINATION lib${LIBCXX_LIBDIR_SUFFIX}
+  LIBRARY DESTINATION lib${LIBCXX_LIBDIR_SUFFIX} COMPONENT libcxx
+  ARCHIVE DESTINATION lib${LIBCXX_LIBDIR_SUFFIX} COMPONENT libcxx
   )
+
+if (NOT CMAKE_CONFIGURATION_TYPES)
+  add_custom_target(install-libcxx
+                    DEPENDS cxx
+                    COMMAND "${CMAKE_COMMAND}"
+                    -DCMAKE_INSTALL_COMPONENT=libcxx
+                    -P "${LIBCXX_BINARY_DIR}/cmake_install.cmake")
+endif()
Index: include/CMakeLists.txt
===================================================================
--- include/CMakeLists.txt
+++ include/CMakeLists.txt
@@ -17,6 +17,7 @@
 if (LIBCXX_INSTALL_HEADERS)
   install(DIRECTORY .
     DESTINATION include/c++/v1
+    COMPONENT libcxx
     FILES_MATCHING
     ${LIBCXX_HEADER_PATTERN}
     PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
Index: cmake/Modules/HandleLibCXXABI.cmake
===================================================================
--- cmake/Modules/HandleLibCXXABI.cmake
+++ cmake/Modules/HandleLibCXXABI.cmake
@@ -43,6 +43,7 @@
           )
         install(FILES "${CMAKE_BINARY_DIR}/include/${fpath}"
           DESTINATION include/c++/v1/${dstdir}
+          COMPONENT libcxx
           PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
           )
         list(APPEND abilib_headers "${CMAKE_BINARY_DIR}/include/${fpath}")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11697.31175.patch
Type: text/x-patch
Size: 1619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150731/97ec5a26/attachment.bin>


More information about the cfe-commits mailing list