[libcxx] r245470 - [libcxx] Add "install-libcxx" target.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 10:41:53 PDT 2015


Author: ericwf
Date: Wed Aug 19 12:41:53 2015
New Revision: 245470

URL: http://llvm.org/viewvc/llvm-project?rev=245470&view=rev
Log:
[libcxx] Add "install-libcxx" target.

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

Reviewers: mclow.lists, danalbert, jroelofs, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11697

Modified:
    libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
    libcxx/trunk/include/CMakeLists.txt
    libcxx/trunk/lib/CMakeLists.txt

Modified: libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake?rev=245470&r1=245469&r2=245470&view=diff
==============================================================================
--- libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake (original)
+++ libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake Wed Aug 19 12:41:53 2015
@@ -43,6 +43,7 @@ macro(setup_abi_lib abidefines abilib ab
           )
         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}")

Modified: libcxx/trunk/include/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/CMakeLists.txt?rev=245470&r1=245469&r2=245470&view=diff
==============================================================================
--- libcxx/trunk/include/CMakeLists.txt (original)
+++ libcxx/trunk/include/CMakeLists.txt Wed Aug 19 12:41:53 2015
@@ -17,6 +17,7 @@ file(COPY .
 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

Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=245470&r1=245469&r2=245470&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Wed Aug 19 12:41:53 2015
@@ -134,6 +134,14 @@ set_target_properties(cxx
   )
 
 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()




More information about the cfe-commits mailing list