llvm.org GIT mirror llvm / 3b8d30d
[CMake] Dependencies for tests in "runtimes" Many of the test cases in the runtimes require LLVM's testing tools, to facilitate this working as expected we need to have all the test targets in the runtimes depend on all LLVM testing tools used in the runtimes. Differential Revision: https://reviews.llvm.org/D33048 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307572 91177308-0d34-0410-b5e6-96231b3b80d8 George Karpenkov 2 years ago
1 changed file(s) with 21 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
250250 foreach(runtime_name ${runtime_names})
251251 list(APPEND extra_targets
252252 ${runtime_name}
253 install-${runtime_name}
254 check-${runtime_name})
253 install-${runtime_name})
254 if(LLVM_INCLUDE_TESTS)
255 list(APPEND test_targets check-${runtime_name})
256 endif()
255257 endforeach()
256258
257259 if(LLVM_INCLUDE_TESTS)
258 set(test_targets runtimes-test-depends check-runtimes)
260 list(APPEND test_targets runtimes-test-depends check-runtimes)
259261 foreach(component ${SUB_COMPONENTS})
260262 list(APPEND SUB_COMPONENT_CHECK_TARGETS check-${component})
261263 endforeach()
291293 if(LLVM_INCLUDE_TESTS)
292294 set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_DEPENDS runtimes-test-depends)
293295 set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_TARGETS check-runtimes)
296
297 set(RUNTIMES_TEST_DEPENDS
298 FileCheck
299 count
300 llvm-nm
301 llvm-objdump
302 llvm-xray
303 not
304 obj2yaml
305 sancov
306 sanstats
307 asan
308 )
309 foreach(target ${test_targets} ${SUB_COMPONENT_CHECK_TARGETS})
310 add_dependencies(${target} ${RUNTIMES_TEST_DEPENDS})
311 endforeach()
294312 endif()
295313 endif()
296314 endif()