[libcxx] r268124 - [CMake] Create a separate install target for libcxx headers

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 23:18:08 PDT 2016


On Fri, Apr 29, 2016 at 4:17 PM, Chris Bieneman via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: cbieneman
> Date: Fri Apr 29 17:17:15 2016
> New Revision: 268124
>
> URL: http://llvm.org/viewvc/llvm-project?rev=268124&view=rev
> Log:
> [CMake] Create a separate install target for libcxx headers
>
> This change doesn't impact the behavior of the install-libcxx target which
> installs whichever libcxx components you build, it just adds a separate
> target to just install the headers.
>
> Modified:
>     libcxx/trunk/include/CMakeLists.txt
>     libcxx/trunk/lib/CMakeLists.txt
>
> Modified: libcxx/trunk/include/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/CMakeLists.txt?rev=268124&r1=268123&r2=268124&view=diff
>
> ==============================================================================
> --- libcxx/trunk/include/CMakeLists.txt (original)
> +++ libcxx/trunk/include/CMakeLists.txt Fri Apr 29 17:17:15 2016
> @@ -19,7 +19,7 @@ file(COPY .
>  if (LIBCXX_INSTALL_HEADERS)
>    install(DIRECTORY .
>      DESTINATION include/c++/v1
> -    COMPONENT libcxx
> +    COMPONENT libcxx-headers
>      FILES_MATCHING
>      ${LIBCXX_HEADER_PATTERN}
>      PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
> @@ -46,7 +46,17 @@ if (LIBCXX_INSTALL_HEADERS)
>        DESTINATION include/c++/v1
>        PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
>        RENAME __config
> -      COMPONENT libcxx)
> +      COMPONENT libcxx-headers)
> +  endif()
> +
> +  if (NOT CMAKE_CONFIGURATION_TYPES)
> +    # this target is just needed as a placeholder for the distribution
> target
> +    add_custom_target(libcxx-headers)
> +    add_custom_target(install-libcxx-headers
> +                      DEPENDS ${name} libcxx-headers
>

What's `${name}` ?



> +                      COMMAND "${CMAKE_COMMAND}"
> +                              -DCMAKE_INSTALL_COMPONENT=libcxx-headers
> +                              -P
> "${CMAKE_BINARY_DIR}/cmake_install.cmake")
>    endif()
>
>  endif()
>
> Modified: libcxx/trunk/lib/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=268124&r1=268123&r2=268124&view=diff
>
> ==============================================================================
> --- libcxx/trunk/lib/CMakeLists.txt (original)
> +++ libcxx/trunk/lib/CMakeLists.txt Fri Apr 29 17:17:15 2016
> @@ -180,8 +180,11 @@ if (NOT CMAKE_CONFIGURATION_TYPES AND (L
>      if(LIBCXX_INSTALL_LIBRARY)
>        set(deps DEPENDS cxx)
>      endif()
> +    if(LIBCXX_INSTALL_HEADERS)
> +      set(deps DEPENDS install-libcxx-headers)
> +    endif()
>      add_custom_target(install-libcxx
> -                      ${deps}
> +                      ${deps}
>                        COMMAND "${CMAKE_COMMAND}"
>                        -DCMAKE_INSTALL_COMPONENT=libcxx
>                        -P "${LIBCXX_BINARY_DIR}/cmake_install.cmake")
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160503/58b4909c/attachment.html>


More information about the cfe-commits mailing list