[libcxxabi] r286161 - Fix libcxxabi CMake detection of libcxx path to handle LLVM_EXTERNAL_LIBCXX_SOURCE_DIR flag
Mehdi Amini via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 7 14:07:43 PST 2016
Author: mehdi_amini
Date: Mon Nov 7 16:07:43 2016
New Revision: 286161
URL: http://llvm.org/viewvc/llvm-project?rev=286161&view=rev
Log:
Fix libcxxabi CMake detection of libcxx path to handle LLVM_EXTERNAL_LIBCXX_SOURCE_DIR flag
Differential Revision: https://reviews.llvm.org/D26364
Modified:
libcxxabi/trunk/CMakeLists.txt
Modified: libcxxabi/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=286161&r1=286160&r2=286161&view=diff
==============================================================================
--- libcxxabi/trunk/CMakeLists.txt (original)
+++ libcxxabi/trunk/CMakeLists.txt Mon Nov 7 16:07:43 2016
@@ -137,13 +137,19 @@ if (NOT LIBCXXABI_ENABLE_SHARED AND NOT
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 @@ find_path(
test/libcxx/__init__.py
PATHS ${LIBCXXABI_LIBCXX_PATH}
${LIBCXXABI_LIBCXX_INCLUDES}/../
- ${LLVM_MAIN_SRC_DIR}/projects/libcxx/
+ ${LIBCXXABI_LIBCXX_SRC_DIR}
NO_DEFAULT_PATH
)
More information about the cfe-commits
mailing list