[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / llvm / unittests / Support / CMakeLists.txt
blob66eecb5377c9befad12030782bf4e60be2d9b2c7
1 set(LLVM_LINK_COMPONENTS
2   Support
3   )
5 add_llvm_unittest(SupportTests
6   AlignmentTest.cpp
7   AlignOfTest.cpp
8   AllocatorTest.cpp
9   AnnotationsTest.cpp
10   ARMAttributeParser.cpp
11   ArrayRecyclerTest.cpp
12   Base64Test.cpp
13   BinaryStreamTest.cpp
14   BlockFrequencyTest.cpp
15   BranchProbabilityTest.cpp
16   CachePruningTest.cpp
17   CrashRecoveryTest.cpp
18   Casting.cpp
19   CheckedArithmeticTest.cpp
20   Chrono.cpp
21   CommandLineTest.cpp
22   CompressionTest.cpp
23   ConvertUTFTest.cpp
24   CRCTest.cpp
25   DataExtractorTest.cpp
26   DebugTest.cpp
27   DebugCounterTest.cpp
28   DJBTest.cpp
29   EndianStreamTest.cpp
30   EndianTest.cpp
31   ELFAttributeParserTest.cpp
32   ErrnoTest.cpp
33   ErrorOrTest.cpp
34   ErrorTest.cpp
35   ExtensibleRTTITest.cpp
36   FileCollectorTest.cpp
37   FileOutputBufferTest.cpp
38   FileUtilitiesTest.cpp
39   FormatVariadicTest.cpp
40   FSUniqueIDTest.cpp
41   GlobPatternTest.cpp
42   HashBuilderTest.cpp
43   Host.cpp
44   IndexedAccessorTest.cpp
45   InstructionCostTest.cpp
46   ItaniumManglingCanonicalizerTest.cpp
47   JSONTest.cpp
48   KnownBitsTest.cpp
49   LEB128Test.cpp
50   LinearPolyBaseTest.cpp
51   LineIteratorTest.cpp
52   LockFileManagerTest.cpp
53   MatchersTest.cpp
54   MD5Test.cpp
55   ManagedStatic.cpp
56   MathExtrasTest.cpp
57   MemoryBufferRefTest.cpp
58   MemoryBufferTest.cpp
59   MemoryTest.cpp
60   NativeFormatTests.cpp
61   OptimizedStructLayoutTest.cpp
62   ParallelTest.cpp
63   Path.cpp
64   ProcessTest.cpp
65   ProgramTest.cpp
66   RegexTest.cpp
67   ReverseIterationTest.cpp
68   ReplaceFileTest.cpp
69   RISCVAttributeParserTest.cpp
70   ScaledNumberTest.cpp
71   ScopedPrinterTest.cpp
72   SHA256.cpp
73   SourceMgrTest.cpp
74   SpecialCaseListTest.cpp
75   SuffixTreeTest.cpp
76   SwapByteOrderTest.cpp
77   SymbolRemappingReaderTest.cpp
78   TarWriterTest.cpp
79   TargetParserTest.cpp
80   TaskQueueTest.cpp
81   ThreadLocalTest.cpp
82   ThreadPool.cpp
83   Threading.cpp
84   TimerTest.cpp
85   ToolOutputFileTest.cpp
86   TypeNameTest.cpp
87   TypeTraitsTest.cpp
88   TrailingObjectsTest.cpp
89   TrigramIndexTest.cpp
90   UnicodeTest.cpp
91   VersionTupleTest.cpp
92   VirtualFileSystemTest.cpp
93   WithColorTest.cpp
94   YAMLIOTest.cpp
95   YAMLParserTest.cpp
96   buffer_ostream_test.cpp
97   formatted_raw_ostream_test.cpp
98   raw_fd_stream_test.cpp
99   raw_ostream_test.cpp
100   raw_pwrite_stream_test.cpp
101   raw_sha1_ostream_test.cpp
102   xxhashTest.cpp
103   )
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'
113 if(NOT MSVC)
114   set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
115 endif()
116 if(MSVC)
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)
123   endif()
124 endif()
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)
132 endif()
134 add_subdirectory(CommandLineInit)