[PATCH] D62155: [CMake] Copy C++ headers during config on Darwin

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 12:33:38 PDT 2019


beanz marked an inline comment as done.
beanz added inline comments.


================
Comment at: llvm/runtimes/CMakeLists.txt:46
+  if ("libcxx" IN_LIST LLVM_ENABLE_RUNTIMES)
+    execute_process(COMMAND ditto ${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR}/include ${LLVM_INCLUDE_DIR}/c++/v1/)
+  endif()
----------------
phosek wrote:
> smeenai wrote:
> > Any reason to prefer this to either `cmake -E copy_directory` or `file(COPY)`?
> Even better, could we factor out the logic for copying headers in https://github.com/llvm/llvm-project/blob/master/libcxx/include/CMakeLists.txt#L218 to a separate `.cmake` module (except for the generated `__config` part that can be only done after we've finished configuration) and then reuse it here?
I was using `ditto` because the code was Darwin-only and `ditto` has been on Darwin for every version of Darwin we support LLVM with, and `ditto` is way faster than `cmake -E ...`

If we want this generalized then it should be done with `cmake -E ...` I'll take a stab at that shortly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62155/new/

https://reviews.llvm.org/D62155





More information about the llvm-commits mailing list