[PATCH] D49584: [CMake] Install C++ ABI headers into the right location

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 20 15:51:02 PDT 2018


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL337630: [CMake] Install C++ ABI headers into the right location (authored by phosek, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D49584?vs=156417&id=156627#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D49584

Files:
  libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake


Index: libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
===================================================================
--- libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
+++ libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
@@ -32,14 +32,6 @@
   set(LIBCXX_CXX_ABI_LIBRARY ${abilib})
   set(LIBCXX_ABILIB_FILES ${abifiles})
 
-  # The place in the build tree where we store out-of-source headers.
-  file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}")
-  file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1")
-  foreach(_d ${abidirs})
-    file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}/${_d}")
-    file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1/${_d}")
-  endforeach()
-
   foreach(fpath ${LIBCXX_ABILIB_FILES})
     set(found FALSE)
     foreach(incpath ${LIBCXX_CXX_ABI_INCLUDE_PATHS})
@@ -56,16 +48,16 @@
             COMMENT "Copying C++ ABI header ${fpath}...")
         list(APPEND abilib_headers "${dst}")
 
-        set(dst "${CMAKE_BINARY_DIR}/include/c++/v1/${dstdir}/${fpath}")
+        set(dst "${LIBCXX_HEADER_DIR}/include/c++/v1/${dstdir}/${fpath}")
         add_custom_command(OUTPUT ${dst}
             DEPENDS ${src}
             COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
             COMMENT "Copying C++ ABI header ${fpath}...")
         list(APPEND abilib_headers "${dst}")
 
         if (LIBCXX_INSTALL_HEADERS)
           install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
-            DESTINATION ${LIBCXX_INSTALL_PATH}include/c++/v1/${dstdir}
+            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir}
             COMPONENT cxx-headers
             PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
             )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49584.156627.patch
Type: text/x-patch
Size: 1713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180720/9ed5384d/attachment.bin>


More information about the cfe-commits mailing list