[PATCH] Fix finding libunwind when only using LIBCXXABI_USE_LLVM_UNWINDER=ON
Jingyi Wei
wjywbs at gmail.com
Sat May 9 13:08:14 PDT 2015
Hi asl,
LIBCXXABI_LIBUNWIND_INCLUDES is already set before calling find_path, and find_path will not update it. So cmake will throw error "include_directories given empty-string as include directory". Use other variable name for the include path and do not find the default libunwind.h in the system path.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D9641
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -307,12 +307,13 @@
include_directories(include)
if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
find_path(
- LIBCXXABI_LIBUNWIND_INCLUDES
+ LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL
libunwind.h
PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES}
${LIBCXXABI_LIBUNWIND_PATH}/include
${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES}
${LLVM_MAIN_SRC_DIR}/projects/libunwind/include
+ NO_DEFAULT_PATH
)
find_path(
@@ -329,7 +330,7 @@
set(LIBCXXABI_LIBUNWIND_SOURCES "")
endif()
- include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES}")
+ include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}")
include_directories("${LIBCXXABI_LIBUNWIND_SOURCES}")
endif ()
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9641.25420.patch
Type: text/x-patch
Size: 876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150509/680f29c6/attachment.bin>
More information about the cfe-commits
mailing list