[libcxxabi] r292018 - [cmake] Handle missing LIBUNWIND_* directories gracefully

Michal Gorny via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 14 09:05:17 PST 2017


Author: mgorny
Date: Sat Jan 14 11:05:16 2017
New Revision: 292018

URL: http://llvm.org/viewvc/llvm-project?rev=292018&view=rev
Log:
[cmake] Handle missing LIBUNWIND_* directories gracefully

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.

Differential Revision: https://reviews.llvm.org/D25314

Modified:
    libcxxabi/trunk/CMakeLists.txt

Modified: libcxxabi/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=292018&r1=292017&r2=292018&view=diff
==============================================================================
--- libcxxabi/trunk/CMakeLists.txt (original)
+++ libcxxabi/trunk/CMakeLists.txt Sat Jan 14 11:05:16 2017
@@ -479,8 +479,12 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_
     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




More information about the cfe-commits mailing list