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 if (LLVM_INCLUDE_TESTS OR LLVM_BUILD_TESTS)
13 add_llvm_executable(${test_name}Tests ${ARGN})
17 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
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
57 add_llvm_unittest(Analysis
58 Analysis/ScalarEvolutionTest.cpp
61 add_llvm_unittest(ExecutionEngine
62 ExecutionEngine/ExecutionEngineTest.cpp
66 ExecutionEngine/JIT/JITEventListenerTest.cpp
67 ExecutionEngine/JIT/JITMemoryManagerTest.cpp
68 ExecutionEngine/JIT/JITTest.cpp
69 ExecutionEngine/JIT/MultiJITTest.cpp
72 add_llvm_unittest(Support
73 Support/AllocatorTest.cpp
75 Support/CommandLineTest.cpp
76 Support/ConstantRangeTest.cpp
77 Support/LeakDetectorTest.cpp
78 Support/MathExtrasTest.cpp
79 Support/raw_ostream_test.cpp
82 Support/TypeBuilderTest.cpp
83 Support/ValueHandleTest.cpp
86 add_llvm_unittest(Transforms
87 Transforms/Utils/Cloning.cpp
90 add_llvm_unittest(VMCore
91 VMCore/ConstantsTest.cpp
92 VMCore/DerivedTypesTest.cpp
93 VMCore/InstructionsTest.cpp
94 VMCore/MetadataTest.cpp
95 VMCore/PassManagerTest.cpp
96 VMCore/VerifierTest.cpp