Skip to content

Commit 1af9c7b

Browse files
committedMay 9, 2015
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. http://reviews.llvm.org/D9641 Patch by Jingyi Wei! llvm-svn: 236936
1 parent 398ae2d commit 1af9c7b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎libcxxabi/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,13 @@ set(LIBCXXABI_LIBUNWIND_PATH "${LIBCXXABI_LIBUNWIND_PATH}" CACHE PATH
307307
include_directories(include)
308308
if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
309309
find_path(
310-
LIBCXXABI_LIBUNWIND_INCLUDES
310+
LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL
311311
libunwind.h
312312
PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES}
313313
${LIBCXXABI_LIBUNWIND_PATH}/include
314314
${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES}
315315
${LLVM_MAIN_SRC_DIR}/projects/libunwind/include
316+
NO_DEFAULT_PATH
316317
)
317318

318319
find_path(
@@ -329,7 +330,7 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
329330
set(LIBCXXABI_LIBUNWIND_SOURCES "")
330331
endif()
331332

332-
include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES}")
333+
include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}")
333334
include_directories("${LIBCXXABI_LIBUNWIND_SOURCES}")
334335
endif ()
335336

0 commit comments

Comments
 (0)