[XRay][compiler-rt] CMake fixes for XRay -- take 2.

The bootstrap buildbot complains about not being able to find the
unittests for XRay, when the conditionals to include or not include
tests and unit tests don't match.

This is a follow-up to D26232.

llvm-svn: 288786
This commit is contained in:
Dean Michael Berris 2016-12-06 08:40:16 +00:00
parent d94c0bf4be
commit dcd2748a34
1 changed files with 5 additions and 3 deletions

View File

@ -26,12 +26,14 @@ if (COMPILER_RT_BUILD_XRAY AND COMPILER_RT_HAS_XRAY)
endif() endif()
# Add unit tests. # Add unit tests.
if(COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_CAN_EXECUTE_TESTS) if(COMPILER_RT_INCLUDE_TESTS)
configure_lit_site_cfg( configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg) ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg)
list(APPEND XRAY_TEST_DEPS XRayUnitTests) if (COMPILER_RT_CAN_EXECUTE_TESTS AND NOT ANDROID)
list(APPEND XRAY_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit) list(APPEND XRAY_TEST_DEPS XRayUnitTests)
list(APPEND XRAY_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit)
endif()
endif() endif()
add_lit_testsuite(check-xray "Running the XRay tests" add_lit_testsuite(check-xray "Running the XRay tests"