[PATCH] D33059: Create an shared include directory for gtest helper functions

Juergen Ributzka via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 13:44:48 PDT 2017


Hi Zack,

this breaks cmake for me when I try to configure a build with NO targets:
CMake Error at cmake/modules/LLVM-Config.cmake:31 (list): list sub-command
REMOVE_ITEM requires two or more arguments. Call Stack (most recent call
first): cmake/modules/LLVM-Config.cmake:256 (is_llvm_target_library)
cmake/modules/LLVM-Config.cmake:100 (llvm_map_components_to_libnames)
cmake/modules/LLVM-Config.cmake:93 (explicit_llvm_config)
cmake/modules/AddLLVM.cmake:714 (llvm_config)
cmake/modules/AddLLVM.cmake:1025 (add_llvm_executable)
unittests/CMakeLists.txt:5 (add_unittest)
unittests/DebugInfo/CodeView/CMakeLists.txt:11 (add_llvm_unittest)

TestingSupport is configured with BUILDTREE_ONLY. This prevents it from
being added to LLVM_LIBS. This seems intentional and mirrors what
gtest_main is doing. The problem is that once you add TestingSupport as a
link dependency our current cmake logic fails. It works for test_main,
because it is never listed in LLVM_LINK_COMPONENTS and always added as part
of add_unittest.

Doing the same for TestingSupport would fix the issue.

--Juergen

On Wed, Jun 14, 2017 at 9:42 AM, Zachary Turner via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:

> This revision was automatically updated to reflect the committed changes.
> Closed by commit rL305395: [gtest] Create a shared include directory for
> gtest utilities. (authored by zturner).
>
> Changed prior to commit:
>   https://reviews.llvm.org/D33059?vs=102340&id=102563#toc
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D33059
>
> Files:
>   llvm/trunk/include/llvm/Testing/Support/Error.h
>   llvm/trunk/include/llvm/Testing/Support/SupportHelpers.h
>   llvm/trunk/lib/CMakeLists.txt
>   llvm/trunk/lib/LLVMBuild.txt
>   llvm/trunk/lib/Testing/CMakeLists.txt
>   llvm/trunk/lib/Testing/LLVMBuild.txt
>   llvm/trunk/lib/Testing/Support/CMakeLists.txt
>   llvm/trunk/lib/Testing/Support/Error.cpp
>   llvm/trunk/lib/Testing/Support/LLVMBuild.txt
>   llvm/trunk/unittests/DebugInfo/CodeView/CMakeLists.txt
>   llvm/trunk/unittests/DebugInfo/CodeView/ErrorChecking.h
>   llvm/trunk/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
>   llvm/trunk/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
>   llvm/trunk/unittests/DebugInfo/PDB/CMakeLists.txt
>   llvm/trunk/unittests/DebugInfo/PDB/ErrorChecking.h
>   llvm/trunk/unittests/DebugInfo/PDB/HashTableTest.cpp
>   llvm/trunk/unittests/DebugInfo/PDB/MSFBuilderTest.cpp
>   llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
>   llvm/trunk/unittests/DebugInfo/PDB/StringTableBuilderTest.cpp
>   llvm/trunk/unittests/DebugInfo/PDB/TypeServerHandlerTest.cpp
>   llvm/trunk/unittests/Support/BinaryStreamTest.cpp
>   llvm/trunk/unittests/Support/CMakeLists.txt
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170614/dc4908e6/attachment.html>


More information about the llvm-commits mailing list