aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2017-10-14 21:38:13 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2017-10-14 21:38:13 +0000
commitbb3e2cf04a77924335c5e05600b2a287daac8de4 (patch)
tree694b2aaaf4dd460837942949d114476f3ba0af60
parentaa529e36fb04cb7dc7d26e7ef2c5bd97d1b2638a (diff)
downloadcompiler-rt-bb3e2cf04a77924335c5e05600b2a287daac8de4.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315827 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/xray/tests/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/xray/tests/CMakeLists.txt b/lib/xray/tests/CMakeLists.txt
index f88024b9f..e54e63f27 100644
--- a/lib/xray/tests/CMakeLists.txt
+++ b/lib/xray/tests/CMakeLists.txt
@@ -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()