[llvm-exegesis] Implements a cache of Instruction objects.
[llvm-core.git] / tools / llvm-exegesis / lib / CMakeLists.txt
blob8fdf8b997e0f2c72569107ba4d5c0b107aa45b1a
1 set(TARGETS_TO_APPEND "")
3 if (LLVM_TARGETS_TO_BUILD MATCHES "X86")
4   add_subdirectory(X86)
5   set(TARGETS_TO_APPEND "${TARGETS_TO_APPEND} X86")
6 endif()
7 if (LLVM_TARGETS_TO_BUILD MATCHES "AArch64")
8   add_subdirectory(AArch64)
9   set(TARGETS_TO_APPEND "${TARGETS_TO_APPEND} AArch64")
10 endif()
12 set(LLVM_EXEGESIS_TARGETS "${LLVM_EXEGESIS_TARGETS} ${TARGETS_TO_APPEND}" PARENT_SCOPE)
14 add_library(LLVMExegesis
15   STATIC
16   Analysis.cpp
17   Assembler.cpp
18   BenchmarkResult.cpp
19   BenchmarkRunner.cpp
20   Clustering.cpp
21   CodeTemplate.cpp
22   Latency.cpp
23   LlvmState.cpp
24   MCInstrDescView.cpp
25   PerfHelper.cpp
26   RegisterAliasing.cpp
27   SnippetGenerator.cpp
28   RegisterValue.cpp
29   Target.cpp
30   Uops.cpp
31   )
33 llvm_update_compile_flags(LLVMExegesis)
34 llvm_map_components_to_libnames(libs
35   Analysis
36   CodeGen
37   Core
38   ExecutionEngine
39   GlobalISel
40   MC
41   MCDisassembler
42   MCJIT
43   Object
44   ObjectYAML
45   Support
46   )
48 if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM)
49   list(APPEND libs pfm)
50 endif()
52 target_link_libraries(LLVMExegesis ${libs})
53 set_target_properties(LLVMExegesis PROPERTIES FOLDER "Libraries")