mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-21 18:29:45 +00:00
Simplify the naming pattern in the unittests' CMake file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158893 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
45df6f9e04
commit
b1081af7a2
@ -11,15 +11,15 @@ function(add_llvm_unittest test_dirname)
|
|||||||
set(EXCLUDE_FROM_ALL ON)
|
set(EXCLUDE_FROM_ALL ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_llvm_executable(${test_name}Tests ${ARGN})
|
add_llvm_executable(${test_name} ${ARGN})
|
||||||
target_link_libraries(${test_name}Tests
|
target_link_libraries(${test_name}
|
||||||
gtest
|
gtest
|
||||||
gtest_main
|
gtest_main
|
||||||
LLVMSupport # gtest needs it for raw_ostream.
|
LLVMSupport # gtest needs it for raw_ostream.
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(UnitTests ${test_name}Tests)
|
add_dependencies(UnitTests ${test_name})
|
||||||
set_target_properties(${test_name}Tests PROPERTIES FOLDER "Tests")
|
set_target_properties(${test_name} PROPERTIES FOLDER "Tests")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Visual Studio 2012 only supports up to 8 template parameters in
|
# Visual Studio 2012 only supports up to 8 template parameters in
|
||||||
@ -58,7 +58,7 @@ set(LLVM_LINK_COMPONENTS
|
|||||||
Support
|
Support
|
||||||
)
|
)
|
||||||
|
|
||||||
add_llvm_unittest(ADT
|
add_llvm_unittest(ADTTests
|
||||||
ADT/APFloatTest.cpp
|
ADT/APFloatTest.cpp
|
||||||
ADT/APIntTest.cpp
|
ADT/APIntTest.cpp
|
||||||
ADT/BitVectorTest.cpp
|
ADT/BitVectorTest.cpp
|
||||||
@ -87,11 +87,11 @@ add_llvm_unittest(ADT
|
|||||||
ADT/VariadicFunctionTest.cpp
|
ADT/VariadicFunctionTest.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_llvm_unittest(Analysis
|
add_llvm_unittest(AnalysisTests
|
||||||
Analysis/ScalarEvolutionTest.cpp
|
Analysis/ScalarEvolutionTest.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_llvm_unittest(ExecutionEngine
|
add_llvm_unittest(ExecutionEngineTests
|
||||||
ExecutionEngine/ExecutionEngineTest.cpp
|
ExecutionEngine/ExecutionEngineTest.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -130,13 +130,15 @@ if(MSVC)
|
|||||||
list(APPEND JITTestsSources ExecutionEngine/JIT/JITTests.def)
|
list(APPEND JITTestsSources ExecutionEngine/JIT/JITTests.def)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_llvm_unittest(ExecutionEngine/JIT ${JITTestsSources})
|
add_llvm_unittest(ExecutionEngine/JITTests
|
||||||
|
${JITTestsSources}
|
||||||
|
)
|
||||||
|
|
||||||
if(MINGW OR CYGWIN)
|
if(MINGW OR CYGWIN)
|
||||||
set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
|
set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_llvm_unittest(Transforms/Utils
|
add_llvm_unittest(Transforms/UtilsTests
|
||||||
Transforms/Utils/Cloning.cpp
|
Transforms/Utils/Cloning.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -156,9 +158,11 @@ if(MSVC AND MSVC_VERSION LESS 1600)
|
|||||||
list(REMOVE_ITEM VMCoreSources VMCore/ValueMapTest.cpp)
|
list(REMOVE_ITEM VMCoreSources VMCore/ValueMapTest.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_llvm_unittest(VMCore ${VMCoreSources})
|
add_llvm_unittest(VMCoreTests
|
||||||
|
${VMCoreSources}
|
||||||
|
)
|
||||||
|
|
||||||
add_llvm_unittest(Bitcode
|
add_llvm_unittest(BitcodeTests
|
||||||
Bitcode/BitReaderTest.cpp
|
Bitcode/BitReaderTest.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -167,7 +171,7 @@ set(LLVM_LINK_COMPONENTS
|
|||||||
Core
|
Core
|
||||||
)
|
)
|
||||||
|
|
||||||
add_llvm_unittest(Support
|
add_llvm_unittest(SupportTests
|
||||||
Support/AlignOfTest.cpp
|
Support/AlignOfTest.cpp
|
||||||
Support/AllocatorTest.cpp
|
Support/AllocatorTest.cpp
|
||||||
Support/BlockFrequencyTest.cpp
|
Support/BlockFrequencyTest.cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user