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 ExtensibleRTTITest.cpp
43 FileOutputBufferTest.cpp
44 FormatVariadicTest.cpp
48 IndexedAccessorTest.cpp
49 InstructionCostTest.cpp
54 LockFileManagerTest.cpp
59 MemoryBufferRefTest.cpp
63 OptimizedStructLayoutTest.cpp
66 PerThreadBumpPtrAllocatorTest.cpp
70 ReverseIterationTest.cpp
72 RISCVAttributeParserTest.cpp
79 SpecialCaseListTest.cpp
84 ThreadSafeAllocatorTest.cpp
88 ToolOutputFileTest.cpp
92 TrailingObjectsTest.cpp
96 VirtualFileSystemTest.cpp
100 buffer_ostream_test.cpp
101 formatted_raw_ostream_test.cpp
102 raw_fd_stream_test.cpp
104 raw_pwrite_stream_test.cpp
105 raw_sha1_ostream_test.cpp
112 target_link_libraries(SupportTests PRIVATE LLVMTestingSupport)
114 # Disable all warning for AlignOfTest.cpp,
115 # as it does things intentionally, and there is no reliable way of
116 # disabling all warnings for all the compilers by using pragmas.
117 # Don't disable on MSVC, because all incriminated warnings are already disabled
118 # in source; and because we would otherwise see this warning:
119 # cl : Command line warning D9025: overriding '/W4' with '/w'
121 set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
124 if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.14 )
125 # Since VS2017 15.8, the following snippet: Failed<CustomSubError>()
126 # generates a warning:
127 # \svn\llvm\utils\unittest\googlemock\include\gmock\gmock-matchers.h(186):
128 # warning C5046: 'testing::MatcherInterface<T>::~MatcherInterface': Symbol involving type with internal linkage not defined
129 set_source_files_properties(ErrorTest.cpp PROPERTIES COMPILE_FLAGS -wd5046)
133 # ManagedStatic.cpp uses <pthread>.
134 target_link_libraries(SupportTests PRIVATE LLVMTestingSupport ${LLVM_PTHREAD_LIB})
136 if(NOT LLVM_INTEGRATED_CRT_ALLOC)
137 # The test doesn't pass when using a custom allocator, PR47881.
138 add_subdirectory(DynamicLibrary)
141 add_subdirectory(CommandLineInit)