Inline a few CMake variables into their only uses.
authorNico Weber <nicolasweber@gmx.de>
Mon, 14 May 2018 19:23:31 +0000 (19:23 +0000)
committerNico Weber <nicolasweber@gmx.de>
Mon, 14 May 2018 19:23:31 +0000 (19:23 +0000)
No behavior change. Makes unittests CMakeLists.txt files more self-consistent.

llvm-svn: 332280

llvm/unittests/ADT/CMakeLists.txt
llvm/unittests/CodeGen/CMakeLists.txt
llvm/unittests/DebugInfo/CodeView/CMakeLists.txt
llvm/unittests/DebugInfo/DWARF/CMakeLists.txt
llvm/unittests/DebugInfo/MSF/CMakeLists.txt
llvm/unittests/DebugInfo/PDB/CMakeLists.txt
llvm/unittests/Demangle/CMakeLists.txt
llvm/unittests/IR/CMakeLists.txt
llvm/unittests/Linker/CMakeLists.txt
llvm/unittests/XRay/CMakeLists.txt

index d11bdc7..8f0d176 100644 (file)
@@ -2,7 +2,7 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
-set(ADTSources
+add_llvm_unittest(ADTTests
   APFloatTest.cpp
   APIntTest.cpp
   APSIntTest.cpp
@@ -65,10 +65,6 @@ set(ADTSources
   TripleTest.cpp
   TwineTest.cpp
   VariadicFunctionTest.cpp
- )
-
-add_llvm_unittest(ADTTests
-  ${ADTSources}
   )
 
 add_dependencies(ADTTests intrinsics_gen)
index 05b72ce..3a91127 100644 (file)
@@ -8,7 +8,7 @@ set(LLVM_LINK_COMPONENTS
   Target
   )
 
-set(CodeGenSources
+add_llvm_unittest(CodeGenTests
   DIEHashTest.cpp
   LowLevelTypeTest.cpp
   MachineInstrBundleIteratorTest.cpp
@@ -17,8 +17,4 @@ set(CodeGenSources
   ScalableVectorMVTsTest.cpp
   )
 
-add_llvm_unittest(CodeGenTests
-  ${CodeGenSources}
-  )
-
 add_subdirectory(GlobalISel)
index d06ccfa..70a7b8a 100644 (file)
@@ -2,14 +2,10 @@ set(LLVM_LINK_COMPONENTS
   DebugInfoCodeView
   )
 
-set(DebugInfoCodeViewSources
+add_llvm_unittest(DebugInfoCodeViewTests
   RandomAccessVisitorTest.cpp
   TypeHashingTest.cpp
   TypeIndexDiscoveryTest.cpp
   )
 
-add_llvm_unittest(DebugInfoCodeViewTests
-  ${DebugInfoCodeViewSources}
-  )
-
 target_link_libraries(DebugInfoCodeViewTests PRIVATE LLVMTestingSupport)
index f8ebedf..d97e573 100644 (file)
@@ -8,7 +8,7 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
-set(DebugInfoSources
+add_llvm_unittest(DebugInfoDWARFTests
   DwarfGenerator.cpp
   DwarfUtils.cpp
   DWARFDebugInfoTest.cpp
@@ -16,8 +16,4 @@ set(DebugInfoSources
   DWARFFormValueTest.cpp
   )
 
-add_llvm_unittest(DebugInfoDWARFTests
-  ${DebugInfoSources}
-  )
-
 target_link_libraries(DebugInfoDWARFTests PRIVATE LLVMTestingSupport)
index 20f3b2a..0e48ab8 100644 (file)
@@ -2,14 +2,10 @@ set(LLVM_LINK_COMPONENTS
   DebugInfoMSF
   )
 
-set(DebugInfoMSFSources
+add_llvm_unittest(DebugInfoMSFTests
   MappedBlockStreamTest.cpp
   MSFBuilderTest.cpp
   MSFCommonTest.cpp
   )
 
-add_llvm_unittest(DebugInfoMSFTests
-  ${DebugInfoMSFSources}
-  )
-
 target_link_libraries(DebugInfoMSFTests PRIVATE LLVMTestingSupport)
index b19ee2c..5410e5f 100644 (file)
@@ -4,14 +4,10 @@ set(LLVM_LINK_COMPONENTS
   DebugInfoPDB
   )
 
-set(DebugInfoPDBSources
+add_llvm_unittest(DebugInfoPDBTests
   HashTableTest.cpp
   StringTableBuilderTest.cpp
   PDBApiTest.cpp
   )
 
-add_llvm_unittest(DebugInfoPDBTests
-  ${DebugInfoPDBSources}
-  )
-
 target_link_libraries(DebugInfoPDBTests PRIVATE LLVMTestingSupport)
index 4bf3699..3633d32 100644 (file)
@@ -2,10 +2,6 @@ set(LLVM_LINK_COMPONENTS
   Demangle
 )
 
-set(DemangleSources
-  PartialDemangleTest.cpp
-)
-
 add_llvm_unittest(DemangleTests
-  ${DemangleSources}
+  PartialDemangleTest.cpp
 )
index b04b097..17aba85 100644 (file)
@@ -6,7 +6,7 @@ set(LLVM_LINK_COMPONENTS
   Passes
   )
 
-set(IRSources
+add_llvm_unittest(IRTests
   AsmWriterTest.cpp
   AttributesTest.cpp
   BasicBlockTest.cpp
@@ -40,7 +40,3 @@ set(IRSources
   VerifierTest.cpp
   WaymarkTest.cpp
   )
-
-add_llvm_unittest(IRTests
-  ${IRSources}
-  )
index 05f45c0..e94f4be 100644 (file)
@@ -4,10 +4,6 @@ set(LLVM_LINK_COMPONENTS
   linker
   )
 
-set(LinkerSources
-  LinkModulesTest.cpp
-  )
-
 add_llvm_unittest(LinkerTests
-  ${LinkerSources}
+  LinkModulesTest.cpp
   )
index 30bccd1..9872c90 100644 (file)
@@ -2,12 +2,8 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
-set(XRAYSources
- GraphTest.cpp
- )
-
 add_llvm_unittest(XRayTests
-    ${XRAYSources}
+  GraphTest.cpp
   )
 
 add_dependencies(XRayTests intrinsics_gen)