Support: Add Endian.h
[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 endfunction()
14
15 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
16 set(LLVM_REQUIRES_RTTI 1)
17 add_definitions(-DGTEST_HAS_RTTI=0)
18
19 set(LLVM_LINK_COMPONENTS
20   jit
21   interpreter
22   nativecodegen
23   BitWriter
24   BitReader
25   AsmParser
26   Core
27   System
28   Support
29   )
30
31 set(LLVM_USED_LIBS
32   gtest
33   gtest_main
34   )
35
36 add_llvm_unittest(ADT
37   ADT/APFloatTest.cpp
38   ADT/APIntTest.cpp
39   ADT/BitVectorTest.cpp
40   ADT/DAGDeltaAlgorithmTest.cpp
41   ADT/DeltaAlgorithmTest.cpp
42   ADT/DenseMapTest.cpp
43   ADT/DenseSetTest.cpp
44   ADT/ilistTest.cpp
45   ADT/ImmutableSetTest.cpp
46   ADT/SmallBitVectorTest.cpp
47   ADT/SmallStringTest.cpp
48   ADT/SmallVectorTest.cpp
49   ADT/SparseBitVectorTest.cpp
50   ADT/StringMapTest.cpp
51   ADT/StringRefTest.cpp
52   ADT/TripleTest.cpp
53   ADT/TwineTest.cpp
54  )
55
56 add_llvm_unittest(Analysis
57   Analysis/ScalarEvolutionTest.cpp
58   )
59
60 add_llvm_unittest(ExecutionEngine
61   ExecutionEngine/ExecutionEngineTest.cpp
62   )
63
64 add_llvm_unittest(JIT
65   ExecutionEngine/JIT/JITEventListenerTest.cpp
66   ExecutionEngine/JIT/JITMemoryManagerTest.cpp
67   ExecutionEngine/JIT/JITTest.cpp
68   ExecutionEngine/JIT/MultiJITTest.cpp
69   )
70
71 add_llvm_unittest(Transforms
72   Transforms/Utils/Cloning.cpp
73   )
74
75 add_llvm_unittest(VMCore
76   VMCore/ConstantsTest.cpp
77   VMCore/DerivedTypesTest.cpp
78   VMCore/InstructionsTest.cpp
79   VMCore/MetadataTest.cpp
80   VMCore/PassManagerTest.cpp
81   VMCore/VerifierTest.cpp
82   )
83
84 set(LLVM_LINK_COMPONENTS
85   System
86   Support
87   Core
88   )
89
90 add_llvm_unittest(Support
91   Support/AllocatorTest.cpp
92   Support/Casting.cpp
93   Support/CommandLineTest.cpp
94   Support/ConstantRangeTest.cpp
95   Support/EndianTest.cpp
96   Support/LeakDetectorTest.cpp
97   Support/MathExtrasTest.cpp
98   Support/raw_ostream_test.cpp
99   Support/RegexTest.cpp
100   Support/SwapByteOrderTest.cpp
101   Support/System.cpp
102   Support/TypeBuilderTest.cpp
103   Support/ValueHandleTest.cpp
104   )