1 add_custom_target(UnitTests)
2 set_target_properties(UnitTests PROPERTIES FOLDER "Tests")
4 function(add_llvm_unittest test_dirname)
5 add_unittest(UnitTests ${test_dirname} ${ARGN})
8 set(LLVM_LINK_COMPONENTS
19 add_llvm_unittest(ADTTests
23 ADT/DAGDeltaAlgorithmTest.cpp
24 ADT/DeltaAlgorithmTest.cpp
30 ADT/ImmutableSetTest.cpp
31 ADT/IntEqClassesTest.cpp
32 ADT/IntervalMapTest.cpp
33 ADT/IntrusiveRefCntPtrTest.cpp
34 ADT/PackedVectorTest.cpp
35 ADT/SCCIteratorTest.cpp
36 ADT/SmallPtrSetTest.cpp
37 ADT/SmallStringTest.cpp
38 ADT/SmallVectorTest.cpp
39 ADT/SparseBitVectorTest.cpp
45 ADT/VariadicFunctionTest.cpp
48 add_llvm_unittest(AnalysisTests
49 Analysis/ScalarEvolutionTest.cpp
52 add_llvm_unittest(ExecutionEngineTests
53 ExecutionEngine/ExecutionEngineTest.cpp
56 if( LLVM_USE_INTEL_JITEVENTS )
57 include_directories( ${LLVM_INTEL_JITEVENTS_INCDIR} )
58 link_directories( ${LLVM_INTEL_JITEVENTS_LIBDIR} )
59 set(ProfileTestSources
60 ExecutionEngine/JIT/IntelJITEventListenerTest.cpp
62 set(LLVM_LINK_COMPONENTS
63 ${LLVM_LINK_COMPONENTS}
66 endif( LLVM_USE_INTEL_JITEVENTS )
68 if( LLVM_USE_OPROFILE )
69 set(ProfileTestSources
71 ExecutionEngine/JIT/OProfileJITEventListenerTest.cpp
73 set(LLVM_LINK_COMPONENTS
74 ${LLVM_LINK_COMPONENTS}
77 endif( LLVM_USE_OPROFILE )
80 ExecutionEngine/JIT/JITEventListenerTest.cpp
81 ExecutionEngine/JIT/JITMemoryManagerTest.cpp
82 ExecutionEngine/JIT/JITTest.cpp
83 ExecutionEngine/JIT/MultiJITTest.cpp
88 list(APPEND JITTestsSources ExecutionEngine/JIT/JITTests.def)
91 add_llvm_unittest(ExecutionEngine/JITTests
96 set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
99 add_llvm_unittest(Transforms/UtilsTests
100 Transforms/Utils/Cloning.cpp
104 VMCore/ConstantsTest.cpp
105 VMCore/DominatorTreeTest.cpp
106 VMCore/InstructionsTest.cpp
107 VMCore/MetadataTest.cpp
108 VMCore/PassManagerTest.cpp
109 VMCore/ValueMapTest.cpp
110 VMCore/VerifierTest.cpp
113 # MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
114 # See issue#331418 in Visual Studio.
115 if(MSVC AND MSVC_VERSION LESS 1600)
116 list(REMOVE_ITEM VMCoreSources VMCore/ValueMapTest.cpp)
119 add_llvm_unittest(VMCoreTests
123 add_llvm_unittest(BitcodeTests
124 Bitcode/BitReaderTest.cpp
127 set(LLVM_LINK_COMPONENTS
132 add_llvm_unittest(SupportTests
133 Support/AlignOfTest.cpp
134 Support/AllocatorTest.cpp
135 Support/BlockFrequencyTest.cpp
137 Support/CommandLineTest.cpp
138 Support/ConstantRangeTest.cpp
139 Support/DataExtractorTest.cpp
140 Support/EndianTest.cpp
141 Support/IntegersSubsetTest.cpp
142 Support/IRBuilderTest.cpp
143 Support/LeakDetectorTest.cpp
144 Support/ManagedStatic.cpp
145 Support/MathExtrasTest.cpp
146 Support/MDBuilderTest.cpp
148 Support/raw_ostream_test.cpp
149 Support/RegexTest.cpp
150 Support/SwapByteOrderTest.cpp
151 Support/TimeValue.cpp
152 Support/TypeBuilderTest.cpp
153 Support/ValueHandleTest.cpp
154 Support/YAMLParserTest.cpp