[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / CMakeLists.txt
blobabc8ea75da180ba1bcf1d0bfb69d469c05921f1f
1 llvm_canonicalize_cmake_booleans(
2   ENABLE_BACKTRACES
3   LLVM_ENABLE_ZLIB
4   LLVM_ENABLE_ZSTD
5   LLVM_ENABLE_LIBXML2
6   LLD_DEFAULT_LD_LLD_IS_MINGW
7   LLVM_BUILD_EXAMPLES
8   LLVM_ENABLE_PLUGINS
9   LLVM_BYE_LINK_INTO_TOOLS
10   LLVM_TOOL_LLVM_DRIVER_BUILD
11   )
13 configure_lit_site_cfg(
14   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
15   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
16   MAIN_CONFIG
17   ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
18   PATHS
19   "LLVM_SOURCE_DIR"
20   "LLVM_BINARY_DIR"
21   "LLVM_TOOLS_DIR"
22   "LLVM_LIBS_DIR"
23   "SHLIBDIR"
24   "LLVM_LIT_TOOLS_DIR"
25   "LLD_BINARY_DIR"
26   "CURRENT_LIBS_DIR"
27   "CURRENT_TOOLS_DIR"
28   "LLD_SOURCE_DIR"
29   )
30 configure_lit_site_cfg(
31   ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
32   ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
33   MAIN_CONFIG
34   ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
35   PATHS
36   "SHLIBDIR"
37   "LLD_BINARY_DIR"
38   "LLD_SOURCE_DIR"
41 set(LLD_TEST_DEPS lld LLDUnitTests)
42 if (NOT LLD_BUILT_STANDALONE)
43   list(APPEND LLD_TEST_DEPS
44     FileCheck
45     count
46     dsymutil
47     llc
48     llvm-ar
49     llvm-as
50     llvm-bcanalyzer
51     llvm-cgdata
52     llvm-config
53     llvm-cvtres
54     llvm-dis
55     llvm-dlltool
56     llvm-dwarfdump
57     llvm-lib
58     llvm-lipo
59     llvm-mc
60     llvm-nm
61     llvm-objcopy
62     llvm-objdump
63     llvm-otool
64     llvm-pdbutil
65     llvm-profdata
66     llvm-readelf
67     llvm-readobj
68     llvm-strings
69     llvm-strip
70     llvm-symbolizer
71     not
72     obj2yaml
73     opt
74     split-file
75     yaml2obj
76     )
77     if (NOT WIN32 AND LLVM_BUILD_EXAMPLES)
78       list(APPEND LLD_TEST_DEPS
79         Bye
80         )
81     endif()
82 endif()
84 add_lit_testsuite(check-lld "Running lld test suite"
85   ${CMAKE_CURRENT_BINARY_DIR}
86   DEPENDS ${LLD_TEST_DEPS}
87   )
89 add_custom_target(lld-test-depends DEPENDS ${LLD_TEST_DEPS})
90 set_target_properties(lld-test-depends PROPERTIES FOLDER "LLD/Tests")
92 add_lit_testsuites(LLD ${CMAKE_CURRENT_SOURCE_DIR}
93   DEPENDS ${LLD_TEST_DEPS}
94   )
96 # Add a legacy target spelling: lld-test
97 add_custom_target(lld-test)
98 add_dependencies(lld-test check-lld)
99 set_target_properties(lld-test PROPERTIES FOLDER "LLD/Tests")