1 set(LLVM_LINK_COMPONENTS
5 add_llvm_unittest(SupportTests
10 ARMAttributeParser.cpp
14 BlockFrequencyTest.cpp
15 BranchProbabilityTest.cpp
19 CheckedArithmeticTest.cpp
31 ELFAttributeParserTest.cpp
35 ExtensibleRTTITest.cpp
37 FileOutputBufferTest.cpp
39 FormatVariadicTest.cpp
44 IndexedAccessorTest.cpp
45 InstructionCostTest.cpp
46 ItaniumManglingCanonicalizerTest.cpp
50 LinearPolyBaseTest.cpp
52 LockFileManagerTest.cpp
57 MemoryBufferRefTest.cpp
61 OptimizedStructLayoutTest.cpp
67 ReverseIterationTest.cpp
69 RISCVAttributeParserTest.cpp
74 SpecialCaseListTest.cpp
77 SymbolRemappingReaderTest.cpp
85 ToolOutputFileTest.cpp
88 TrailingObjectsTest.cpp
92 VirtualFileSystemTest.cpp
96 buffer_ostream_test.cpp
97 formatted_raw_ostream_test.cpp
98 raw_fd_stream_test.cpp
100 raw_pwrite_stream_test.cpp
101 raw_sha1_ostream_test.cpp
105 target_link_libraries(SupportTests PRIVATE LLVMTestingSupport)
107 # Disable all warning for AlignOfTest.cpp,
108 # as it does things intentionally, and there is no reliable way of
109 # disabling all warnings for all the compilers by using pragmas.
110 # Don't disable on MSVC, because all incriminated warnings are already disabled
111 # in source; and because we would otherwise see this warning:
112 # cl : Command line warning D9025: overriding '/W4' with '/w'
114 set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
117 if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.14 )
118 # Since VS2017 15.8, the following snippet: Failed<CustomSubError>()
119 # generates a warning:
120 # \svn\llvm\utils\unittest\googlemock\include\gmock\gmock-matchers.h(186):
121 # warning C5046: 'testing::MatcherInterface<T>::~MatcherInterface': Symbol involving type with internal linkage not defined
122 set_source_files_properties(ErrorTest.cpp PROPERTIES COMPILE_FLAGS -wd5046)
126 # ManagedStatic.cpp uses <pthread>.
127 target_link_libraries(SupportTests PRIVATE LLVMTestingSupport ${LLVM_PTHREAD_LIB})
129 if(NOT LLVM_INTEGRATED_CRT_ALLOC)
130 # The test doesn't pass when using a custom allocator, PR47881.
131 add_subdirectory(DynamicLibrary)
134 add_subdirectory(CommandLineInit)