[compiler-rt] r315827 - [xray] Fix CMake for X-RAY tests

George Karpenkov via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 14 14:38:13 PDT 2017


Author: george.karpenkov
Date: Sat Oct 14 14:38:13 2017
New Revision: 315827

URL: http://llvm.org/viewvc/llvm-project?rev=315827&view=rev
Log:
[xray] Fix CMake for X-RAY tests

Correctly depend on llvm-xray, make sure unit tests are being run.

Differential Revision: https://reviews.llvm.org/D38917

Modified:
    compiler-rt/trunk/lib/xray/tests/CMakeLists.txt

Modified: compiler-rt/trunk/lib/xray/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/tests/CMakeLists.txt?rev=315827&r1=315826&r2=315827&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/xray/tests/CMakeLists.txt Sat Oct 14 14:38:13 2017
@@ -20,13 +20,14 @@ macro(add_xray_unittest testname)
       generate_compiler_rt_tests(TEST_OBJECTS
         XRayUnitTests "${testname}-${arch}-Test" "${arch}"
         SOURCES ${TEST_SOURCES} ${COMPILER_RT_GTEST_SOURCE}
-        DEPS gtest xray
+        DEPS gtest xray llvm-xray
         CFLAGS ${XRAY_UNITTEST_CFLAGS}
         LINK_FLAGS -fxray-instrument
           ${TARGET_LINK_FLAGS}
           -lstdc++ -lm ${CMAKE_THREAD_LIBS_INIT}
           -lpthread
           -ldl -lrt)
+      set_target_properties(XRayUnitTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
     endforeach()
   endif()
 endmacro()




More information about the llvm-commits mailing list