[PATCH] D29573: [libunwind][CMake] Use libc++ headers when available

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 18:32:04 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL294554: [libunwind][CMake] Use libc++ headers when available (authored by phosek).

Changed prior to commit:
  https://reviews.llvm.org/D29573?vs=87706&id=87749#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29573

Files:
  libunwind/trunk/CMakeLists.txt


Index: libunwind/trunk/CMakeLists.txt
===================================================================
--- libunwind/trunk/CMakeLists.txt
+++ libunwind/trunk/CMakeLists.txt
@@ -282,4 +282,23 @@
 
 include_directories(include)
 
+find_path(
+  LIBUNWIND_LIBCXX_INCLUDES_INTERNAL
+  __libcpp_version
+  PATHS ${LLVM_MAIN_SRC_DIR}/projects/libcxx/include
+        ${LLVM_MAIN_SRC_DIR}/runtimes/libcxx/include
+  NO_DEFAULT_PATH
+)
+if ((NOT LIBUNWIND_STANDALONE_BUILD OR HAVE_LIBCXX) AND
+    IS_DIRECTORY "${LIBUNWIND_LIBCXX_INCLUDES_INTERNAL}")
+  set(LIBUNWIND_CXX_INCLUDE_PATHS_DEFAULT "${LIBUNWIND_LIBCXX_INCLUDES_INTERNAL}")
+endif()
+
+set(LIBUNWIND_CXX_INCLUDE_PATHS "${LIBUNWIND_CXX_INCLUDE_PATHS_DEFAULT}" CACHE PATH
+    "Paths to C++ header directories separated by ';'.")
+
+if (NOT LIBUNWIND_CXX_INCLUDE_PATHS STREQUAL "")
+  include_directories("${LIBUNWIND_CXX_INCLUDE_PATHS}")
+endif()
+
 add_subdirectory(src)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29573.87749.patch
Type: text/x-patch
Size: 928 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/6c6b7ef7/attachment.bin>


More information about the llvm-commits mailing list