[PATCH] D26364: Fix libcxxabi CMake detection of libcxx path to handle LLVM_EXTERNAL_LIBCXX_SOURCE_DIR flag

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 14:17:27 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL286161: Fix libcxxabi CMake detection of libcxx path to handle… (authored by mehdi_amini).

Changed prior to commit:
  https://reviews.llvm.org/D26364?vs=77078&id=77101#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26364

Files:
  libcxxabi/trunk/CMakeLists.txt


Index: libcxxabi/trunk/CMakeLists.txt
===================================================================
--- libcxxabi/trunk/CMakeLists.txt
+++ libcxxabi/trunk/CMakeLists.txt
@@ -137,13 +137,19 @@
   message(FATAL_ERROR "libc++abi must be built as either a shared or static library.")
 endif()
 
+if (LLVM_EXTERNAL_LIBCXX_SOURCE_DIR)
+  set(LIBCXXABI_LIBCXX_SRC_DIR ${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR})
+else()
+  set(LIBCXXABI_LIBCXX_SRC_DIR ${LLVM_MAIN_SRC_DIR}/projects/libcxx/include)
+endif()
+
 find_path(
   LIBCXXABI_LIBCXX_INCLUDES
   vector
   PATHS ${LIBCXXABI_LIBCXX_INCLUDES}
         ${LIBCXXABI_LIBCXX_PATH}/include
         ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBCXX_INCLUDES}
-        ${LLVM_MAIN_SRC_DIR}/projects/libcxx/include
+        ${LIBCXXABI_LIBCXX_SRC_DIR}/include
         ${LLVM_INCLUDE_DIR}/c++/v1
   )
 
@@ -155,7 +161,7 @@
   test/libcxx/__init__.py
   PATHS ${LIBCXXABI_LIBCXX_PATH}
         ${LIBCXXABI_LIBCXX_INCLUDES}/../
-        ${LLVM_MAIN_SRC_DIR}/projects/libcxx/
+        ${LIBCXXABI_LIBCXX_SRC_DIR}
   NO_DEFAULT_PATH
   )
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26364.77101.patch
Type: text/x-patch
Size: 1064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161107/381c734c/attachment.bin>


More information about the llvm-commits mailing list