[llvm] r307572 - [CMake] Dependencies for tests in "runtimes"

George Karpenkov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 12:23:28 PDT 2017


Author: george.karpenkov
Date: Mon Jul 10 12:23:28 2017
New Revision: 307572

URL: http://llvm.org/viewvc/llvm-project?rev=307572&view=rev
Log:
[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

Modified:
    llvm/trunk/runtimes/CMakeLists.txt

Modified: llvm/trunk/runtimes/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtimes/CMakeLists.txt?rev=307572&r1=307571&r2=307572&view=diff
==============================================================================
--- llvm/trunk/runtimes/CMakeLists.txt (original)
+++ llvm/trunk/runtimes/CMakeLists.txt Mon Jul 10 12:23:28 2017
@@ -251,12 +251,14 @@ else() # if this is included from LLVM's
     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
     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()




More information about the llvm-commits mailing list