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})
15 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
16 set(LLVM_REQUIRES_RTTI 1)
17 add_definitions(-DGTEST_HAS_RTTI=0)
19 set(LLVM_LINK_COMPONENTS
40 ADT/DAGDeltaAlgorithmTest.cpp
41 ADT/DeltaAlgorithmTest.cpp
45 ADT/ImmutableSetTest.cpp
46 ADT/SmallBitVectorTest.cpp
47 ADT/SmallStringTest.cpp
48 ADT/SmallVectorTest.cpp
49 ADT/SparseBitVectorTest.cpp
56 add_llvm_unittest(Analysis
57 Analysis/ScalarEvolutionTest.cpp
60 add_llvm_unittest(ExecutionEngine
61 ExecutionEngine/ExecutionEngineTest.cpp
65 ExecutionEngine/JIT/JITEventListenerTest.cpp
66 ExecutionEngine/JIT/JITMemoryManagerTest.cpp
67 ExecutionEngine/JIT/JITTest.cpp
68 ExecutionEngine/JIT/MultiJITTest.cpp
71 add_llvm_unittest(Transforms
72 Transforms/Utils/Cloning.cpp
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
84 set(LLVM_LINK_COMPONENTS
90 add_llvm_unittest(Support
91 Support/AllocatorTest.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
100 Support/SwapByteOrderTest.cpp
102 Support/TypeBuilderTest.cpp
103 Support/ValueHandleTest.cpp