From b1081af7a283a03b37a8dd7f6adbc4f743b2cc00 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 21 Jun 2012 02:02:48 +0000 Subject: [PATCH] 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 --- unittests/CMakeLists.txt | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 6af095e9200..6baf80c39bf 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -11,15 +11,15 @@ function(add_llvm_unittest test_dirname) set(EXCLUDE_FROM_ALL ON) endif() - add_llvm_executable(${test_name}Tests ${ARGN}) - target_link_libraries(${test_name}Tests + add_llvm_executable(${test_name} ${ARGN}) + target_link_libraries(${test_name} gtest gtest_main LLVMSupport # gtest needs it for raw_ostream. ) - add_dependencies(UnitTests ${test_name}Tests) - set_target_properties(${test_name}Tests PROPERTIES FOLDER "Tests") + add_dependencies(UnitTests ${test_name}) + set_target_properties(${test_name} PROPERTIES FOLDER "Tests") endfunction() # Visual Studio 2012 only supports up to 8 template parameters in @@ -58,7 +58,7 @@ set(LLVM_LINK_COMPONENTS Support ) -add_llvm_unittest(ADT +add_llvm_unittest(ADTTests ADT/APFloatTest.cpp ADT/APIntTest.cpp ADT/BitVectorTest.cpp @@ -87,11 +87,11 @@ add_llvm_unittest(ADT ADT/VariadicFunctionTest.cpp ) -add_llvm_unittest(Analysis +add_llvm_unittest(AnalysisTests Analysis/ScalarEvolutionTest.cpp ) -add_llvm_unittest(ExecutionEngine +add_llvm_unittest(ExecutionEngineTests ExecutionEngine/ExecutionEngineTest.cpp ) @@ -130,13 +130,15 @@ if(MSVC) list(APPEND JITTestsSources ExecutionEngine/JIT/JITTests.def) endif() -add_llvm_unittest(ExecutionEngine/JIT ${JITTestsSources}) +add_llvm_unittest(ExecutionEngine/JITTests + ${JITTestsSources} + ) if(MINGW OR CYGWIN) set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols) endif() -add_llvm_unittest(Transforms/Utils +add_llvm_unittest(Transforms/UtilsTests Transforms/Utils/Cloning.cpp ) @@ -156,9 +158,11 @@ if(MSVC AND MSVC_VERSION LESS 1600) list(REMOVE_ITEM VMCoreSources VMCore/ValueMapTest.cpp) endif() -add_llvm_unittest(VMCore ${VMCoreSources}) +add_llvm_unittest(VMCoreTests + ${VMCoreSources} + ) -add_llvm_unittest(Bitcode +add_llvm_unittest(BitcodeTests Bitcode/BitReaderTest.cpp ) @@ -167,7 +171,7 @@ set(LLVM_LINK_COMPONENTS Core ) -add_llvm_unittest(Support +add_llvm_unittest(SupportTests Support/AlignOfTest.cpp Support/AllocatorTest.cpp Support/BlockFrequencyTest.cpp