1 function(add_llvm_unittest test_name)
3 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
4 ${LLVM_BINARY_DIR}/unittests/${test_name}/${CMAKE_BUILD_TYPE})
6 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
7 ${LLVM_BINARY_DIR}/unittests/${test_name})
9 if( NOT LLVM_BUILD_TESTS )
10 set(EXCLUDE_FROM_ALL ON)
12 add_llvm_executable(${test_name}Tests ${ARGN})
13 add_dependencies(UnitTests ${test_name}Tests)
16 add_custom_target(UnitTests)
18 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
19 add_definitions(-DGTEST_HAS_RTTI=0)
21 set(LLVM_LINK_COMPONENTS
42 ADT/DAGDeltaAlgorithmTest.cpp
43 ADT/DeltaAlgorithmTest.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
59 add_llvm_unittest(Analysis
60 Analysis/ScalarEvolutionTest.cpp
63 add_llvm_unittest(ExecutionEngine
64 ExecutionEngine/ExecutionEngineTest.cpp
68 ExecutionEngine/JIT/JITEventListenerTest.cpp
69 ExecutionEngine/JIT/JITMemoryManagerTest.cpp
70 ExecutionEngine/JIT/JITTest.cpp
71 ExecutionEngine/JIT/MultiJITTest.cpp
74 add_llvm_unittest(Transforms
75 Transforms/Utils/Cloning.cpp
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
88 set(LLVM_LINK_COMPONENTS
94 add_llvm_unittest(Support
95 Support/AllocatorTest.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
106 Support/TypeBuilderTest.cpp
107 Support/ValueHandleTest.cpp