<div dir="ltr">Right. That makes sense. LGTM.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 5:04 PM, Russell Harmon <span dir="ltr"><<a href="mailto:eatnumber1@google.com" target="_blank">eatnumber1@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I had to make one addition to your suggestion, specifically that of the <span style="font-family:arial,sans-serif;font-size:13px">LIBCXX_CXX_ABI_INTREE variable in order to know that we have a libc++abi in tree in the portion where I add cxxabi as a dependency.</span></div>

<div class="HOEnZb"><div class="h5">

<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 5:03 PM,  <span dir="ltr"><<a href="mailto:eatnumber1@google.com" target="_blank">eatnumber1@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>From: Russell Harmon <<a href="mailto:eatnumber1@google.com" target="_blank">eatnumber1@google.com</a>><br>
<br>
This will detect if you are building libcxx in-tree and libcxxabi is available.<br>
If so, it will default to using the in-tree libcxxabi by setting LIBCXX_CXX_ABI<br>
to "libcxxabi", LIBCXX_LIBCXXABI_INCLUDE_PATHS to<br>
"${CMAKE_SOURCE_DIR}/projects/libcxxabi/include" and will add "cxxabi" as a<br>
proper dependency.<br>
---<br>
</div> CMakeLists.txt | 12 +++++++++++-<br>
 1 file changed, 11 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/CMakeLists.txt b/CMakeLists.txt<br>
index c20e5d1..1345eef 100644<br>
--- a/CMakeLists.txt<br>
+++ b/CMakeLists.txt<br>
@@ -46,7 +46,13 @@ option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support headers." ON)<br>
<div><br>
 set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)<br>
 if (NOT DEFINED LIBCXX_CXX_ABI)<br>
-  set(LIBCXX_CXX_ABI "none")<br>
</div>+  if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi")<br>
+    set(LIBCXX_CXX_ABI "libcxxabi")<br>
<div>+    set(LIBCXX_LIBCXXABI_INCLUDE_PATHS "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")<br>
</div>+    set(LIBCXX_CXX_ABI_INTREE 1)<br>
<div>+  else ()<br>
+    set(LIBCXX_CXX_ABI "none")<br>
+  endif ()<br>
 endif()<br>
 set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING<br>
     "Specify C++ ABI library to use." FORCE)<br>
</div>@@ -149,6 +155,10 @@ elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxabi")<br>
<div>   setup_abi_lib("LIBCXX_LIBCXXABI_INCLUDE_PATHS" ""<br>
     "c++abi" "cxxabi.h" ""<br>
     )<br>
+<br>
</div>+  if (LIBCXX_CXX_ABI_INTREE)<br>
<div>+    add_dependencies(LIBCXX_CXX_ABI_DEPS cxxabi)<br>
+  endif ()<br>
</div><div><div> elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxrt")<br>
   setup_abi_lib("LIBCXX_LIBCXXRT_INCLUDE_PATHS" "-DLIBCXXRT"<br>
     "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""<br>
--<br>
2.0.0.526.g5318336<br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>