[PATCH] D25314: [libcxxabi] [cmake] Handle missing LIBUNWIND_* directories gracefully

Michał Górny via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 05:15:18 PDT 2016


mgorny created this revision.
mgorny added reviewers: EricWF, asl.
mgorny added a subscriber: cfe-commits.
Herald added a subscriber: beanz.

Add LIBUNWIND_* directories to include path only if they were actually
found, in order to fix the CMake error. Both of the directories are
usually unnecessary since libcxxabi uses only the common part of
unwind.h that is supplied both by GCC and Clang.


https://reviews.llvm.org/D25314

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -390,8 +390,12 @@
     set(LIBCXXABI_LIBUNWIND_SOURCES "")
   endif()
 
-  include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}")
-  include_directories("${LIBCXXABI_LIBUNWIND_SOURCES}")
+  if (NOT LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL STREQUAL "LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL-NOTFOUND")
+    include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}")
+  endif()
+  if (NOT LIBCXXABI_LIBUNWIND_SOURCES STREQUAL "")
+    include_directories("${LIBCXXABI_LIBUNWIND_SOURCES}")
+  endif()
 endif()
 
 # Add source code. This also contains all of the logic for deciding linker flags


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25314.73770.patch
Type: text/x-patch
Size: 730 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161006/4940a9d7/attachment-0001.bin>


More information about the cfe-commits mailing list