[XRay][compiler-rt] Fix unit test adding logic.
authorDean Michael Berris <dberris@google.com>
Tue, 6 Dec 2016 08:22:31 +0000 (08:22 +0000)
committerDean Michael Berris <dberris@google.com>
Tue, 6 Dec 2016 08:22:31 +0000 (08:22 +0000)
Before this change we would add the unit tests potentially even if we
don't actually include the unit tests.

This is a follow-up on D26232.

llvm-svn: 288785

compiler-rt/test/xray/CMakeLists.txt

index 4f13dde..d80e7fa 100644 (file)
@@ -26,7 +26,7 @@ if (COMPILER_RT_BUILD_XRAY AND COMPILER_RT_HAS_XRAY)
 endif()
 
 # Add unit tests.
-if(COMPILER_RT_INCLUDE_TESTS)
+if(COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_CAN_EXECUTE_TESTS)
   configure_lit_site_cfg(
     ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
     ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg)