summaryrefslogtreecommitdiff
path: root/runtimes/CMakeLists.txt
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2017-07-10 19:23:28 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2017-07-10 19:23:28 +0000
commit3b8d30db1d0b07469b4ab7cc3f1ae9d776135d84 (patch)
tree8e17b4eee9097d194dc5f29335307ffcb7a36e37 /runtimes/CMakeLists.txt
parent8f321099a36be24bbab44bfb6929e3ed86eff1f5 (diff)
[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
Diffstat (limited to 'runtimes/CMakeLists.txt')
-rw-r--r--runtimes/CMakeLists.txt24
1 files changed, 21 insertions, 3 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index 6793a49a2dd..3e98567123e 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -251,12 +251,14 @@ else() # if this is included from LLVM's CMake
foreach(runtime_name ${runtime_names})
list(APPEND extra_targets
${runtime_name}
- install-${runtime_name}
- check-${runtime_name})
+ install-${runtime_name})
+ if(LLVM_INCLUDE_TESTS)
+ list(APPEND test_targets check-${runtime_name})
+ endif()
endforeach()
if(LLVM_INCLUDE_TESTS)
- set(test_targets runtimes-test-depends check-runtimes)
+ list(APPEND test_targets runtimes-test-depends check-runtimes)
foreach(component ${SUB_COMPONENTS})
list(APPEND SUB_COMPONENT_CHECK_TARGETS check-${component})
endforeach()
@@ -292,6 +294,22 @@ else() # if this is included from LLVM's CMake
if(LLVM_INCLUDE_TESTS)
set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_DEPENDS runtimes-test-depends)
set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_TARGETS check-runtimes)
+
+ set(RUNTIMES_TEST_DEPENDS
+ FileCheck
+ count
+ llvm-nm
+ llvm-objdump
+ llvm-xray
+ not
+ obj2yaml
+ sancov
+ sanstats
+ asan
+ )
+ foreach(target ${test_targets} ${SUB_COMPONENT_CHECK_TARGETS})
+ add_dependencies(${target} ${RUNTIMES_TEST_DEPENDS})
+ endforeach()
endif()
endif()
endif()