[PATCH] D52762: [CMake] Use just basename when copying C++ ABI headers

Petr Hosek via Phabricator reviews at reviews.llvm.org
Mon Oct 1 19:14:52 PDT 2018


phosek created this revision.
phosek added reviewers: EricWF, ldionne, mclow.lists.
Herald added subscribers: libcxx-commits, christof, mgorny.

This avoids duplicate directories when the filename includes path.

This addresses PR39145


Repository:
  rCXX libc++

https://reviews.llvm.org/D52762

Files:
  libcxx/cmake/Modules/HandleLibCXXABI.cmake


Index: libcxx/cmake/Modules/HandleLibCXXABI.cmake
===================================================================
--- libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -41,7 +41,7 @@
         get_filename_component(ifile ${fpath} NAME)
         set(src ${incpath}/${fpath})
 
-        set(dst ${LIBCXX_BINARY_INCLUDE_DIR}/${dstdir}/${fpath})
+        set(dst ${LIBCXX_BINARY_INCLUDE_DIR}/${dstdir}/${ifile})
         add_custom_command(OUTPUT ${dst}
             DEPENDS ${src}
             COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52762.167872.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181002/4d50d079/attachment.bin>


More information about the libcxx-commits mailing list