1 set(LLVM_LINK_COMPONENTS
6 add_llvm_unittest(SupportTests
11 ARMAttributeParser.cpp
16 BlockFrequencyTest.cpp
17 BalancedPartitioningTest.cpp
18 BranchProbabilityTest.cpp
22 CheckedArithmeticTest.cpp
29 CSKYAttributeParserTest.cpp
33 DivisionByConstantTest.cpp
37 ELFAttributeParserTest.cpp
41 ExponentialBackoffTest.cpp
42 ExtensibleRTTITest.cpp
44 FileOutputBufferTest.cpp
45 FormatVariadicTest.cpp
49 IndexedAccessorTest.cpp
50 InstructionCostTest.cpp
55 LockFileManagerTest.cpp
60 MemoryBufferRefTest.cpp
64 OptimizedStructLayoutTest.cpp
67 PerThreadBumpPtrAllocatorTest.cpp
71 ReverseIterationTest.cpp
73 RISCVAttributeParserTest.cpp
80 SpecialCaseListTest.cpp
85 ThreadSafeAllocatorTest.cpp
89 ToolOutputFileTest.cpp
93 TrailingObjectsTest.cpp
97 VirtualFileSystemTest.cpp
101 buffer_ostream_test.cpp
102 formatted_raw_ostream_test.cpp
103 raw_fd_stream_test.cpp
105 raw_pwrite_stream_test.cpp
106 raw_sha1_ostream_test.cpp
107 raw_socket_stream_test.cpp
114 target_link_libraries(SupportTests PRIVATE LLVMTestingSupport)
116 # Disable all warning for AlignOfTest.cpp,
117 # as it does things intentionally, and there is no reliable way of
118 # disabling all warnings for all the compilers by using pragmas.
119 # Don't disable on MSVC, because all incriminated warnings are already disabled
120 # in source; and because we would otherwise see this warning:
121 # cl : Command line warning D9025: overriding '/W4' with '/w'
123 set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
126 if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.14 )
127 # Since VS2017 15.8, the following snippet: Failed<CustomSubError>()
128 # generates a warning:
129 # \svn\llvm\utils\unittest\googlemock\include\gmock\gmock-matchers.h(186):
130 # warning C5046: 'testing::MatcherInterface<T>::~MatcherInterface': Symbol involving type with internal linkage not defined
131 set_source_files_properties(ErrorTest.cpp PROPERTIES COMPILE_FLAGS -wd5046)
135 # ManagedStatic.cpp uses <pthread>.
136 target_link_libraries(SupportTests PRIVATE LLVMTestingSupport ${LLVM_PTHREAD_LIB})
138 if(NOT LLVM_INTEGRATED_CRT_ALLOC)
139 # The test doesn't pass when using a custom allocator, PR47881.
140 add_subdirectory(DynamicLibrary)
143 add_subdirectory(CommandLineInit)