[flang] Update CommandTest for AIX (NFC) (#118403)
[llvm-project.git] / llvm / unittests / Analysis / CMakeLists.txt
blob76d16513d93417c01e00ddab19f58c2fddb25924
1 set(LLVM_LINK_COMPONENTS
2   Analysis
3   AsmParser
4   CodeGen
5   Core
6   Instrumentation
7   Passes
8   Support
9   TargetParser
10   TransformUtils
11   IPO
12   )
14 set(ANALYSIS_TEST_SOURCES
15   AliasAnalysisTest.cpp
16   AliasSetTrackerTest.cpp
17   AssumeBundleQueriesTest.cpp
18   BasicAliasAnalysisTest.cpp
19   BlockFrequencyInfoTest.cpp
20   BranchProbabilityInfoTest.cpp
21   CallGraphTest.cpp
22   CaptureTrackingTest.cpp
23   CFGTest.cpp
24   CGSCCPassManagerTest.cpp
25   ConstraintSystemTest.cpp
26   CtxProfAnalysisTest.cpp
27   DDGTest.cpp
28   DomTreeUpdaterTest.cpp
29   DXILResourceTest.cpp
30   GraphWriterTest.cpp
31   GlobalsModRefTest.cpp
32   FunctionPropertiesAnalysisTest.cpp
33   InlineCostTest.cpp
34   IRSimilarityIdentifierTest.cpp
35   IVDescriptorsTest.cpp
36   LastRunTrackingAnalysisTest.cpp
37   LazyCallGraphTest.cpp
38   LoadsTest.cpp
39   LoopInfoTest.cpp
40   LoopNestTest.cpp
41   MemoryBuiltinsTest.cpp
42   MemoryProfileInfoTest.cpp
43   MemorySSATest.cpp
44   MLModelRunnerTest.cpp
45   PhiValuesTest.cpp
46   PluginInlineAdvisorAnalysisTest.cpp
47   PluginInlineOrderAnalysisTest.cpp
48   ProfileSummaryInfoTest.cpp
49   ReplaceWithVecLibTest.cpp
50   ScalarEvolutionTest.cpp
51   SparsePropagation.cpp
52   TargetLibraryInfoTest.cpp
53   TensorSpecTest.cpp
54   TBAATest.cpp
55   UnrollAnalyzerTest.cpp
56   ValueLatticeTest.cpp
57   ValueTrackingTest.cpp
58   VectorUtilsTest.cpp
59   )
61 set(MLGO_TESTS TFUtilsTest.cpp)
63 if (LLVM_HAVE_TFLITE)
64   LIST(APPEND ANALYSIS_TEST_SOURCES ${MLGO_TESTS})
65 else()
66   LIST(APPEND LLVM_OPTIONAL_SOURCES ${MLGO_TESTS})
67 endif()
69 add_llvm_unittest_with_input_files(AnalysisTests
70   ${ANALYSIS_TEST_SOURCES}
72   EXPORT_SYMBOLS
73   )
75 add_dependencies(AnalysisTests intrinsics_gen)
77 target_link_libraries(AnalysisTests PRIVATE LLVMTestingSupport)
79 # On AIX, enable run-time linking to allow symbols from the plugins shared
80 # objects to be properly bound.
81 if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
82   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-brtl")
83 endif()
85 add_subdirectory(InlineAdvisorPlugin)
86 add_subdirectory(InlineOrderPlugin)