[PATCH] D24015: [CMake] Copy headers relative to LLVM_BINARY_DIR

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 29 17:14:16 PDT 2016


Chris Bieneman <beanz at apple.com> writes:
> beanz created this revision.
> beanz added reviewers: bogner, EricWF.
> beanz added a subscriber: cfe-commits.
>
> This copy phase is only needed for in-tree builds, so we should be
> copying to the LLVM build directory's include dir instead of the
> sub-project include dir.

LGTM!

> https://reviews.llvm.org/D24015
>
> Files:
>   include/CMakeLists.txt
>
> Index: include/CMakeLists.txt
> ===================================================================
> --- include/CMakeLists.txt
> +++ include/CMakeLists.txt
> @@ -10,11 +10,13 @@
>    ${LIBCXX_SUPPORT_HEADER_PATTERN}
>    )
>  
> -file(COPY .
> -  DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1"
> -  FILES_MATCHING
> -  ${LIBCXX_HEADER_PATTERN}
> -  )
> +if(LLVM_BINARY_DIR)
> +  file(COPY .
> +    DESTINATION "${LLVM_BINARY_DIR}/include/c++/v1"
> +    FILES_MATCHING
> +    ${LIBCXX_HEADER_PATTERN}
> +    )
> +endif()
>  
>  if (LIBCXX_INSTALL_HEADERS)
>    install(DIRECTORY .
>


More information about the cfe-commits mailing list