aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CMakeLists.txt
blob: d048e871fd0fba221476262df8f3f40e8e495974 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
set(LLVM_LINK_COMPONENTS
  Support
  TargetParser
  )

add_llvm_unittest(SupportTests
  AddressRangeTest.cpp
  AlignmentTest.cpp
  AlignOfTest.cpp
  AllocatorTest.cpp
  ARMAttributeParser.cpp
  ArrayRecyclerTest.cpp
  Base64Test.cpp
  BinaryStreamTest.cpp
  BLAKE3Test.cpp
  BlockFrequencyTest.cpp
  BalancedPartitioningTest.cpp
  BranchProbabilityTest.cpp
  CachePruningTest.cpp
  CrashRecoveryTest.cpp
  Caching.cpp
  Casting.cpp
  CheckedArithmeticTest.cpp
  Chrono.cpp
  CommandLineTest.cpp
  CompressionTest.cpp
  ConvertEBCDICTest.cpp
  ConvertUTFTest.cpp
  CRCTest.cpp
  CSKYAttributeParserTest.cpp
  DataExtractorTest.cpp
  DebugCounterTest.cpp
  DebugTest.cpp
  DivisionByConstantTest.cpp
  DJBTest.cpp
  EndianStreamTest.cpp
  EndianTest.cpp
  ELFAttributeParserTest.cpp
  ErrnoTest.cpp
  ErrorOrTest.cpp
  ErrorTest.cpp
  ExponentialBackoffTest.cpp
  ExtensibleRTTITest.cpp
  FileCollectorTest.cpp
  FileOutputBufferTest.cpp
  FormatVariadicTest.cpp
  FSUniqueIDTest.cpp
  GenericDomTreeTest.cpp
  GlobPatternTest.cpp
  HashBuilderTest.cpp
  IndexedAccessorTest.cpp
  InstructionCostTest.cpp
  InterleavedRangeTest.cpp
  JSONTest.cpp
  KnownBitsTest.cpp
  LEB128Test.cpp
  LineIteratorTest.cpp
  LockFileManagerTest.cpp
  MatchersTest.cpp
  MD5Test.cpp
  ManagedStatic.cpp
  MathExtrasTest.cpp
  MemoryBufferRefTest.cpp
  MemoryBufferTest.cpp
  MemoryTest.cpp
  MustacheTest.cpp
  ModRefTest.cpp
  NativeFormatTests.cpp
  OptimizedStructLayoutTest.cpp
  ParallelTest.cpp
  Path.cpp
  PerThreadBumpPtrAllocatorTest.cpp
  ProcessTest.cpp
  ProgramTest.cpp
  ProgramStackTest.cpp
  RecyclerTest.cpp
  RegexTest.cpp
  ReverseIterationTest.cpp
  ReplaceFileTest.cpp
  RISCVAttributeParserTest.cpp
  ScaledNumberTest.cpp
  ScopedPrinterTest.cpp
  SHA256.cpp
  SignalsTest.cpp
  SipHashTest.cpp
  SourceMgrTest.cpp
  SpecialCaseListTest.cpp
  SuffixTreeTest.cpp
  SwapByteOrderTest.cpp
  TarWriterTest.cpp
  TextEncodingTest.cpp
  ThreadPool.cpp
  ThreadSafeAllocatorTest.cpp
  Threading.cpp
  TimerTest.cpp
  TimeProfilerTest.cpp
  ToolOutputFileTest.cpp
  TypeNameTest.cpp
  TypeSizeTest.cpp
  TypeTraitsTest.cpp
  TrailingObjectsTest.cpp
  UnicodeTest.cpp
  UTCTimeTest.cpp
  VersionTupleTest.cpp
  VirtualFileSystemTest.cpp
  WithColorTest.cpp
  YAMLIOTest.cpp
  YAMLParserTest.cpp
  buffer_ostream_test.cpp
  formatted_raw_ostream_test.cpp
  raw_fd_stream_test.cpp
  raw_ostream_test.cpp
  raw_pwrite_stream_test.cpp
  raw_sha1_ostream_test.cpp
  raw_socket_stream_test.cpp
  xxhashTest.cpp

  DEPENDS
  intrinsics_gen
  )

target_link_libraries(SupportTests PRIVATE LLVMTestingSupport)

# Disable all warning for AlignOfTest.cpp,
# as it does things intentionally, and there is no reliable way of
# disabling all warnings for all the compilers by using pragmas.
# Don't disable on MSVC, because all incriminated warnings are already disabled
# in source; and because we would otherwise see this warning:
#   cl : Command line warning D9025: overriding '/W4' with '/w'
if(NOT MSVC)
  set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
endif()
if(MSVC)
  if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.14 )
    # Since VS2017 15.8, the following snippet: Failed<CustomSubError>()
    # generates a warning:
    # \svn\llvm\utils\unittest\googlemock\include\gmock\gmock-matchers.h(186):
    #   warning C5046: 'testing::MatcherInterface<T>::~MatcherInterface': Symbol involving type with internal linkage not defined
    set_source_files_properties(ErrorTest.cpp PROPERTIES COMPILE_FLAGS -wd5046)
  endif()
endif()

# ManagedStatic.cpp uses <pthread>.
target_link_libraries(SupportTests PRIVATE LLVMTestingSupport ${LLVM_PTHREAD_LIB})

if(NOT LLVM_INTEGRATED_CRT_ALLOC)
  # The test doesn't pass when using a custom allocator, PR47881.
  add_subdirectory(DynamicLibrary)
endif()

add_subdirectory(CommandLineInit)