<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 28, 2014 at 8:36 PM, NAKAMURA Takumi <span dir="ltr"><<a href="mailto:geek4civic@gmail.com" target="_blank">geek4civic@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I suppose I introduced (2). In clang/CMakeLists.txt,<br>
<br>
set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)<br>
if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h<br>
AND NOT EXISTS<br>
${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}<br>
AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)<br>
add_subdirectory(${UNITTEST_DIR} utils/unittest)<br>
endif()<br>
<br>
It'd be my fault if it didn't work.<br>
<br>
I don't know your prerequisites. Let me know your configurations.<br>
I guess the build tree were confused about gtest among llvm binary<br>
tree, llvm source tree and distro's gtest.<br></blockquote><div><br></div><div>Yes, it ended up falling back to the system gtest which does not provide the adapter.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think it'd be good thing if our unittests would work with public gtest.<br></blockquote><div><br></div><div>I agree, and is what I am proposing that we do (remove the conversion support and adapt the changes).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
...Takumi<br>
<br>
<br>
<br>
2014-01-29 Saleem Abdulrasool <<a href="mailto:compnerd@compnerd.org">compnerd@compnerd.org</a>>:<br>
<div class="HOEnZb"><div class="h5">> When building a standalone clang (which I believe most of us don't do, I<br>
> certainly do not do this when developing), I noticed a build failure and<br>
> fixed the particular issue in the build (SVN r200096).<br>
><br>
> I agree with David here that if we are supporting a standalone build, we<br>
> should ensure that it works correctly and builds identically (as much as<br>
> possible) to the non-standalone version so that we do not end up<br>
> accidentally introducing subtle bugs into the build.<br>
><br>
> Digging further into the issue (thanks dblakie!) it seems that the problem<br>
> is exhibited due to a small change to the bundled copy of google-test in the<br>
> LLVM repository. That change was made in 2009 by Jeffery (SVN r81093) to<br>
> assist in printing out types more conveniently by adapting std::ostream to<br>
> LLVM's raw_ostream.<br>
><br>
> We have a few options here:<br>
><br>
> 1) have gtest be part of the installed LLVM image<br>
> 2) duplicate gtest into clang<br>
> 3a) remove the change to google-test and adapt the unit-tests appropriately<br>
> (which is what I did in the previously mentioned change for the cases that I<br>
> found).<br>
> 3b) move the required machinery for supporting google-test into libSupport.<br>
><br>
> I wanted to bring this up on this list in order to facilitate a discussion<br>
> to determine the best course of action.<br>
><br>
> My personal preference would be for 3a. We should adapt the tests to<br>
> perform the necessary conversions to print out information as necessary.<br>
> This would also help reduce divergence from googletest which is a bonus IMO.<br>
><br>
> --<br>
> Saleem Abdulrasool<br>
> compnerd (at) compnerd (dot) org<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>