Add ADT/IntervalMap.
[oota-llvm.git] / unittests / CMakeLists.txt
1 function(add_llvm_unittest test_name)
2   if (CMAKE_BUILD_TYPE)
3     set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
4       ${LLVM_BINARY_DIR}/unittests/${test_name}/${CMAKE_BUILD_TYPE})
5   else()
6     set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
7       ${LLVM_BINARY_DIR}/unittests/${test_name})
8   endif()
9   if( NOT LLVM_BUILD_TESTS )
10     set(EXCLUDE_FROM_ALL ON)
11   endif()
12   add_llvm_executable(${test_name}Tests ${ARGN})
13   add_dependencies(UnitTests ${test_name}Tests)
14 endfunction()
15
16 add_custom_target(UnitTests)
17
18 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
19 add_definitions(-DGTEST_HAS_RTTI=0)
20
21 set(LLVM_LINK_COMPONENTS
22   jit
23   interpreter
24   nativecodegen
25   BitWriter
26   BitReader
27   AsmParser
28   Core
29   System
30   Support
31   )
32
33 set(LLVM_USED_LIBS
34   gtest
35   gtest_main
36   )
37
38 add_llvm_unittest(ADT
39   ADT/APFloatTest.cpp
40   ADT/APIntTest.cpp
41   ADT/BitVectorTest.cpp
42   ADT/DAGDeltaAlgorithmTest.cpp
43   ADT/DeltaAlgorithmTest.cpp
44   ADT/DenseMapTest.cpp
45   ADT/DenseSetTest.cpp
46   ADT/ilistTest.cpp
47   ADT/ImmutableSetTest.cpp
48   ADT/IntervalMapTest.cpp
49   ADT/SmallBitVectorTest.cpp
50   ADT/SmallStringTest.cpp
51   ADT/SmallVectorTest.cpp
52   ADT/SparseBitVectorTest.cpp
53   ADT/StringMapTest.cpp
54   ADT/StringRefTest.cpp
55   ADT/TripleTest.cpp
56   ADT/TwineTest.cpp
57  )
58
59 add_llvm_unittest(Analysis
60   Analysis/ScalarEvolutionTest.cpp
61   )
62
63 add_llvm_unittest(ExecutionEngine
64   ExecutionEngine/ExecutionEngineTest.cpp
65   )
66
67 add_llvm_unittest(JIT
68   ExecutionEngine/JIT/JITEventListenerTest.cpp
69   ExecutionEngine/JIT/JITMemoryManagerTest.cpp
70   ExecutionEngine/JIT/JITTest.cpp
71   ExecutionEngine/JIT/MultiJITTest.cpp
72   )
73
74 add_llvm_unittest(Transforms
75   Transforms/Utils/Cloning.cpp
76   )
77
78 add_llvm_unittest(VMCore
79   VMCore/ConstantsTest.cpp
80   VMCore/DerivedTypesTest.cpp
81   VMCore/InstructionsTest.cpp
82   VMCore/MetadataTest.cpp
83   VMCore/PassManagerTest.cpp
84   VMCore/ValueMapTest.cpp
85   VMCore/VerifierTest.cpp
86   )
87
88 set(LLVM_LINK_COMPONENTS
89   System
90   Support
91   Core
92   )
93
94 add_llvm_unittest(Support
95   Support/AllocatorTest.cpp
96   Support/Casting.cpp
97   Support/CommandLineTest.cpp
98   Support/ConstantRangeTest.cpp
99   Support/EndianTest.cpp
100   Support/LeakDetectorTest.cpp
101   Support/MathExtrasTest.cpp
102   Support/raw_ostream_test.cpp
103   Support/RegexTest.cpp
104   Support/SwapByteOrderTest.cpp
105   Support/System.cpp
106   Support/TypeBuilderTest.cpp
107   Support/ValueHandleTest.cpp
108   )