Clang] Fix expansion of response files in -Wp after integrated-cc1 change
[llvm-project.git] / llvm / tools / llvm-exegesis / lib / CMakeLists.txt
blobaa11d54922e175311d9a55d89140bc324fd1e312
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()
11 if (LLVM_TARGETS_TO_BUILD MATCHES "PowerPC")
12   add_subdirectory(PowerPC)
13   set(TARGETS_TO_APPEND "${TARGETS_TO_APPEND} PowerPC")
14 endif()
15 if (LLVM_TARGETS_TO_BUILD MATCHES "Mips")
16   add_subdirectory(Mips)
17   set(TARGETS_TO_APPEND "${TARGETS_TO_APPEND} Mips")
18 endif()
20 set(LLVM_EXEGESIS_TARGETS "${LLVM_EXEGESIS_TARGETS} ${TARGETS_TO_APPEND}" PARENT_SCOPE)
22 add_library(LLVMExegesis
23   STATIC
24   Analysis.cpp
25   Assembler.cpp
26   BenchmarkResult.cpp
27   BenchmarkRunner.cpp
28   Clustering.cpp
29   CodeTemplate.cpp
30   LatencyBenchmarkRunner.cpp
31   LlvmState.cpp
32   MCInstrDescView.cpp
33   ParallelSnippetGenerator.cpp
34   PerfHelper.cpp
35   RegisterAliasing.cpp
36   RegisterValue.cpp
37   SchedClassResolution.cpp
38   SerialSnippetGenerator.cpp
39   SnippetFile.cpp
40   SnippetGenerator.cpp
41   SnippetRepetitor.cpp
42   Target.cpp
43   UopsBenchmarkRunner.cpp
44   )
46 llvm_update_compile_flags(LLVMExegesis)
47 llvm_map_components_to_libnames(libs
48   Analysis
49   CodeGen
50   Core
51   ExecutionEngine
52   GlobalISel
53   MC
54   MCDisassembler
55   MCJIT
56   MCParser
57   Object
58   ObjectYAML
59   Support
60   )
62 if(LLVM_ENABLE_LIBPFM AND HAVE_LIBPFM)
63   list(APPEND libs pfm)
64 endif()
66 target_link_libraries(LLVMExegesis ${libs})
67 set_target_properties(LLVMExegesis PROPERTIES FOLDER "Libraries")