unit-tests for standalone clang

I suppose I introduced (2). In clang/CMakeLists.txt,

      set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
      if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
          AND NOT EXISTS
${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
          AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
        add_subdirectory(${UNITTEST_DIR} utils/unittest)
      endif()

It'd be my fault if it didn't work.

I don't know your prerequisites. Let me know your configurations.
I guess the build tree were confused about gtest among llvm binary
tree, llvm source tree and distro's gtest.

I think it'd be good thing if our unittests would work with public gtest.

...Takumi

Resend ... damn llvm-dev :frowning:

I suppose I introduced (2). In clang/CMakeLists.txt,

      set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
      if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
          AND NOT EXISTS

${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
          AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
        add_subdirectory(${UNITTEST_DIR} utils/unittest)
      endif()

It'd be my fault if it didn't work.

I don't know your prerequisites. Let me know your configurations.
I guess the build tree were confused about gtest among llvm binary
tree, llvm source tree and distro's gtest.

Yes, it ended up falling back to the system gtest which does not provide
the adapter.

I think it'd be good thing if our unittests would work with public gtest.

I agree, and is what I am proposing that we do (remove the conversion
support and adapt the changes).