Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / unittests / Support / CMakeLists.txt
blob631f2e6bf00df0c414b7179f448453490a90978c
1 set(LLVM_LINK_COMPONENTS
2   Support
3   TargetParser
4   )
6 add_llvm_unittest(SupportTests
7   AddressRangeTest.cpp
8   AlignmentTest.cpp
9   AlignOfTest.cpp
10   AllocatorTest.cpp
11   ARMAttributeParser.cpp
12   ArrayRecyclerTest.cpp
13   Base64Test.cpp
14   BinaryStreamTest.cpp
15   BLAKE3Test.cpp
16   BlockFrequencyTest.cpp
17   BalancedPartitioningTest.cpp
18   BranchProbabilityTest.cpp
19   CachePruningTest.cpp
20   CrashRecoveryTest.cpp
21   Casting.cpp
22   CheckedArithmeticTest.cpp
23   Chrono.cpp
24   CommandLineTest.cpp
25   CompressionTest.cpp
26   ConvertEBCDICTest.cpp
27   ConvertUTFTest.cpp
28   CRCTest.cpp
29   CSKYAttributeParserTest.cpp
30   DataExtractorTest.cpp
31   DebugCounterTest.cpp
32   DebugTest.cpp
33   DivisionByConstantTest.cpp
34   DJBTest.cpp
35   EndianStreamTest.cpp
36   EndianTest.cpp
37   ELFAttributeParserTest.cpp
38   ErrnoTest.cpp
39   ErrorOrTest.cpp
40   ErrorTest.cpp
41   ExponentialBackoffTest.cpp
42   ExtensibleRTTITest.cpp
43   FileCollectorTest.cpp
44   FileOutputBufferTest.cpp
45   FormatVariadicTest.cpp
46   FSUniqueIDTest.cpp
47   GlobPatternTest.cpp
48   HashBuilderTest.cpp
49   IndexedAccessorTest.cpp
50   InstructionCostTest.cpp
51   JSONTest.cpp
52   KnownBitsTest.cpp
53   LEB128Test.cpp
54   LineIteratorTest.cpp
55   LockFileManagerTest.cpp
56   MatchersTest.cpp
57   MD5Test.cpp
58   ManagedStatic.cpp
59   MathExtrasTest.cpp
60   MemoryBufferRefTest.cpp
61   MemoryBufferTest.cpp
62   MemoryTest.cpp
63   NativeFormatTests.cpp
64   OptimizedStructLayoutTest.cpp
65   ParallelTest.cpp
66   Path.cpp
67   PerThreadBumpPtrAllocatorTest.cpp
68   ProcessTest.cpp
69   ProgramTest.cpp
70   RegexTest.cpp
71   ReverseIterationTest.cpp
72   ReplaceFileTest.cpp
73   RISCVAttributeParserTest.cpp
74   ScaledNumberTest.cpp
75   ScopedPrinterTest.cpp
76   SHA256.cpp
77   SignalsTest.cpp
78   SipHashTest.cpp
79   SourceMgrTest.cpp
80   SpecialCaseListTest.cpp
81   SuffixTreeTest.cpp
82   SwapByteOrderTest.cpp
83   TarWriterTest.cpp
84   ThreadPool.cpp
85   ThreadSafeAllocatorTest.cpp
86   Threading.cpp
87   TimerTest.cpp
88   TimeProfilerTest.cpp
89   ToolOutputFileTest.cpp
90   TypeNameTest.cpp
91   TypeSizeTest.cpp
92   TypeTraitsTest.cpp
93   TrailingObjectsTest.cpp
94   UnicodeTest.cpp
95   UTCTimeTest.cpp
96   VersionTupleTest.cpp
97   VirtualFileSystemTest.cpp
98   WithColorTest.cpp
99   YAMLIOTest.cpp
100   YAMLParserTest.cpp
101   buffer_ostream_test.cpp
102   formatted_raw_ostream_test.cpp
103   raw_fd_stream_test.cpp
104   raw_ostream_test.cpp
105   raw_pwrite_stream_test.cpp
106   raw_sha1_ostream_test.cpp
107   raw_socket_stream_test.cpp
108   xxhashTest.cpp
110   DEPENDS
111   intrinsics_gen
112   )
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'
122 if(NOT MSVC)
123   set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
124 endif()
125 if(MSVC)
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)
132   endif()
133 endif()
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)
141 endif()
143 add_subdirectory(CommandLineInit)