summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-05-12 22:48:29 +0000
committerAlexey Samsonov <samsonov@google.com>2014-05-12 22:48:29 +0000
commitc100b726cb83db2ca5740516c957a5ff8a0b177c (patch)
tree8789df8a036a1ffafcd9d279d25d23fcc49169c0 /test/sanitizer_common/CMakeLists.txt
parent19de1ba2e4b0d7a3700a0e2d633a4ee63c1ab317 (diff)
Restrict the set of sanitizers that should run tests from test/sanitizer_common
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/sanitizer_common/CMakeLists.txt')
-rw-r--r--test/sanitizer_common/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/sanitizer_common/CMakeLists.txt b/test/sanitizer_common/CMakeLists.txt
index b34dfc100..dcb09ca00 100644
--- a/test/sanitizer_common/CMakeLists.txt
+++ b/test/sanitizer_common/CMakeLists.txt
@@ -3,8 +3,17 @@ set(SANITIZER_COMMON_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(SANITIZER_COMMON_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
set(SANITIZER_COMMON_TESTSUITES)
+set(SUPPORTED_TOOLS)
+if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD" AND NOT ANDROID)
+ list(APPEND SUPPORTED_TOOLS asan)
+endif()
+if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)
+ list(APPEND SUPPORTED_TOOLS tsan)
+ list(APPEND SUPPORTED_TOOLS msan)
+endif()
+
# Create a separate config for each tool we support.
-foreach(tool asan tsan msan)
+foreach(tool ${SUPPORTED_TOOLS})
string(TOUPPER ${tool} tool_toupper)
if(${tool_toupper}_SUPPORTED_ARCH)
set(SANITIZER_COMMON_LIT_TEST_MODE ${tool})