OSDN Git Service

Renovate CMake files in the `llvm-(cfi-verify|exegesis|mca)` tools.
authorRichard Diamond <wichard@vitalitystudios.com>
Thu, 13 Sep 2018 16:15:03 +0000 (16:15 +0000)
committerRichard Diamond <wichard@vitalitystudios.com>
Thu, 13 Sep 2018 16:15:03 +0000 (16:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342148 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-cfi-verify/lib/CMakeLists.txt
tools/llvm-exegesis/lib/AArch64/CMakeLists.txt
tools/llvm-exegesis/lib/CMakeLists.txt
tools/llvm-exegesis/lib/X86/CMakeLists.txt
tools/llvm-mca/lib/CMakeLists.txt

index 82ca42e..cf5e2ba 100644 (file)
@@ -1,13 +1,12 @@
-add_library(LLVMCFIVerify
-  STATIC
+add_llvm_library(LLVMCFIVerify
   FileAnalysis.cpp
   FileAnalysis.h
   GraphBuilder.cpp
   GraphBuilder.h
-  )
 
-llvm_update_compile_flags(LLVMCFIVerify)
-llvm_map_components_to_libnames(libs
+  STATIC
+
+  LINK_COMPONENTS
   DebugInfoDWARF
   MC
   MCParser
@@ -15,5 +14,3 @@ llvm_map_components_to_libnames(libs
   Support
   Symbolize
   )
-target_link_libraries(LLVMCFIVerify ${libs})
-set_target_properties(LLVMCFIVerify PROPERTIES FOLDER "Libraries")
index a251b8f..cb7ac6a 100644 (file)
@@ -3,16 +3,12 @@ include_directories(
   ${LLVM_BINARY_DIR}/lib/Target/AArch64
   )
 
-add_library(LLVMExegesisAArch64
-  STATIC
+add_llvm_library(LLVMExegesisAArch64
   Target.cpp
-  )
 
-llvm_update_compile_flags(LLVMExegesisAArch64)
-llvm_map_components_to_libnames(libs
+  STATIC
+
+  LINK_COMPONENTS
   AArch64
   Exegesis
   )
-
-target_link_libraries(LLVMExegesisAArch64 ${libs})
-set_target_properties(LLVMExegesisAArch64 PROPERTIES FOLDER "Libraries")
index 17e6a98..3c60adc 100644 (file)
@@ -7,8 +7,12 @@ if (LLVM_TARGETS_TO_BUILD MATCHES "AArch64")
   set(LLVM_EXEGESIS_TARGETS "${LLVM_EXEGESIS_TARGETS} AArch64" PARENT_SCOPE)
 endif()
 
-add_library(LLVMExegesis
-  STATIC
+set(libs)
+if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM)
+  list(APPEND libs pfm)
+endif()
+
+add_llvm_library(LLVMExegesis
   Analysis.cpp
   Assembler.cpp
   BenchmarkResult.cpp
@@ -22,10 +26,10 @@ add_library(LLVMExegesis
   SnippetGenerator.cpp
   Target.cpp
   Uops.cpp
-  )
 
-llvm_update_compile_flags(LLVMExegesis)
-llvm_map_components_to_libnames(libs
+  STATIC
+
+  LINK_COMPONENTS
   Analysis
   CodeGen
   Core
@@ -37,11 +41,6 @@ llvm_map_components_to_libnames(libs
   Object
   ObjectYAML
   Support
-  )
 
-if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM)
-  list(APPEND libs pfm)
-endif()
-
-target_link_libraries(LLVMExegesis ${libs})
-set_target_properties(LLVMExegesis PROPERTIES FOLDER "Libraries")
+  LINK_LIBS ${libs}
+  )
index 912877d..7af660a 100644 (file)
@@ -3,16 +3,12 @@ include_directories(
   ${LLVM_BINARY_DIR}/lib/Target/X86
   )
 
-add_library(LLVMExegesisX86
-  STATIC
+add_llvm_library(LLVMExegesisX86
   Target.cpp
-  )
 
-llvm_update_compile_flags(LLVMExegesisX86)
-llvm_map_components_to_libnames(libs
+  STATIC
+
+  LINK_COMPONENTS
   X86
   Exegesis
   )
-
-target_link_libraries(LLVMExegesisX86 ${libs})
-set_target_properties(LLVMExegesisX86 PROPERTIES FOLDER "Libraries")
index df9ed32..6fc20e6 100644 (file)
@@ -1,7 +1,6 @@
 include_directories(${LLVM_MCA_SOURCE_DIR}/include)
 
-add_library(LLVMMCA
-  STATIC
+add_llvm_library(LLVMMCA
   Context.cpp
   HWEventListener.cpp
   HardwareUnits/HardwareUnit.cpp
@@ -20,14 +19,11 @@ add_library(LLVMMCA
   Stages/RetireStage.cpp
   Stages/Stage.cpp
   Support.cpp
-  )
 
-llvm_update_compile_flags(LLVMMCA)
-llvm_map_components_to_libnames(libs
+  STATIC
+
+  LINK_COMPONENTS
   CodeGen
   MC
   Support
   )
-
-target_link_libraries(LLVMMCA ${libs})
-set_target_properties(LLVMMCA PROPERTIES FOLDER "Libraries")