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/SmallBitVectorTest.cpp
49 ADT/SmallStringTest.cpp
50 ADT/SmallVectorTest.cpp
51 ADT/SparseBitVectorTest.cpp
58 add_llvm_unittest(Analysis
59 Analysis/ScalarEvolutionTest.cpp
62 add_llvm_unittest(ExecutionEngine
63 ExecutionEngine/ExecutionEngineTest.cpp
67 ExecutionEngine/JIT/JITEventListenerTest.cpp
68 ExecutionEngine/JIT/JITMemoryManagerTest.cpp
69 ExecutionEngine/JIT/JITTest.cpp
70 ExecutionEngine/JIT/MultiJITTest.cpp
73 add_llvm_unittest(Transforms
74 Transforms/Utils/Cloning.cpp
77 add_llvm_unittest(VMCore
78 VMCore/ConstantsTest.cpp
79 VMCore/DerivedTypesTest.cpp
80 VMCore/InstructionsTest.cpp
81 VMCore/MetadataTest.cpp
82 VMCore/PassManagerTest.cpp
83 VMCore/VerifierTest.cpp
86 set(LLVM_LINK_COMPONENTS
92 add_llvm_unittest(Support
93 Support/AllocatorTest.cpp
95 Support/CommandLineTest.cpp
96 Support/ConstantRangeTest.cpp
97 Support/EndianTest.cpp
98 Support/LeakDetectorTest.cpp
99 Support/MathExtrasTest.cpp
100 Support/raw_ostream_test.cpp
101 Support/RegexTest.cpp
102 Support/SwapByteOrderTest.cpp
104 Support/TypeBuilderTest.cpp
105 Support/ValueHandleTest.cpp