Change the cmake variable COMPILER_RT_CAN_EXECUTE_TESTS to be an option so that it can overwritten.

The reason why this simple change is needed is that I am trying to set up a
quick cmake/ninja based buildbot and apple-clang does not support using the
sanitizers currently.

The default behavior follows exactly what was there before implying that no ones
builds should be affected at all.

llvm-svn: 178455
This commit is contained in:
Michael Gottesman 2013-04-01 04:13:03 +00:00
parent bc6f4baea9
commit 4ddc2156d6
1 changed files with 3 additions and 3 deletions

View File

@ -99,11 +99,11 @@ endif()
# and target a unix-like system. On Android we define the rules for building
# unit tests, but don't execute them.
if("${CMAKE_HOST_SYSTEM}" STREQUAL "${CMAKE_SYSTEM}" AND UNIX AND NOT ANDROID)
set(COMPILER_RT_CAN_EXECUTE_TESTS TRUE)
option(COMPILER_RT_CAN_EXECUTE_TESTS "Can we execute instrumented tests" ON)
else()
set(COMPILER_RT_CAN_EXECUTE_TESTS FALSE)
option(COMPILER_RT_CAN_EXECUTE_TESTS "Can we execute instrumented tests" OFF)
endif()
# Check if compiler-rt is built with libc++.
find_flag_in_string("${CMAKE_CXX_FLAGS}" "-stdlib=libc++"
COMPILER_RT_USES_LIBCXX)