[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 13:39:27 PST 2017
phosek updated this revision to Diff 87706.
phosek marked 2 inline comments as done.
https://reviews.llvm.org/D29573
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ 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.87706.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170208/5125f87c/attachment.bin>
More information about the llvm-commits
mailing list