================ @@ -0,0 +1,101 @@ +#===-- unittests/CMakeLists.txt --------------------------------------------===# +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===------------------------------------------------------------------------===# + +# Add GTest if not already present. +# Using a function so LLVM_SUBPROJECT_TITLE does not propagate. +function (build_gtest) + set(LLVM_SUBPROJECT_TITLE "Third-Party/Google Test") + add_subdirectory("${LLVM_THIRD_PARTY_DIR}/unittest" "${CMAKE_CURRENT_BINARY_DIR}/third-party/unittest") +endfunction () +if (NOT TARGET llvm_gtest) + build_gtest() +endif () + +# LLVM's modified GTest depends on LLVM, but not all runtime projects using +# GTest also add the include search path. +target_include_directories(llvm_gtest PUBLIC "${LLVM_INCLUDE_DIR}" "${LLVM_MAIN_INCLUDE_DIR}") ---------------- Meinersbur wrote:
I missed this as it was hidden under GitHub's collapsed "hidden items". I reproduced it and fixed in 154b376e40847d62bbe77ecd0e80dcb336878b48 . https://github.com/llvm/llvm-project/pull/110217 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits