From 7fbd9917dcc3cb590205331b82d8efc7322de09b Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 9 Dec 2015 22:45:03 +0000 Subject: [CMake] Provide options for toggling on and off various runtime libraries. Summary: Rather than having to add new "experimental" options each time someone wants to work on bringing a sanitizer to a new platform, this patch makes options for all of them. The default values for the options are set by the platform checks that would have enabled them, but they can be overridden on or off. Reviewers: kubabrecka, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14846 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255170 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CMakeLists.txt | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'test/CMakeLists.txt') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e5c51c8cd..1a7215774 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -36,37 +36,9 @@ endif() # Run sanitizer tests only if we're sure that clang would produce # working binaries. if(COMPILER_RT_CAN_EXECUTE_TESTS) - if(COMPILER_RT_HAS_ASAN) - add_subdirectory(asan) - endif() - if(COMPILER_RT_HAS_DFSAN) - add_subdirectory(dfsan) - endif() - if(COMPILER_RT_HAS_LSAN) - add_subdirectory(lsan) - endif() - if(COMPILER_RT_HAS_MSAN) - add_subdirectory(msan) - endif() - if(COMPILER_RT_HAS_PROFILE) - add_subdirectory(profile) - endif() - if(COMPILER_RT_HAS_SANITIZER_COMMON) - add_subdirectory(sanitizer_common) - endif() - if(COMPILER_RT_HAS_TSAN) - add_subdirectory(tsan) - endif() - if(COMPILER_RT_HAS_UBSAN) - add_subdirectory(ubsan) - endif() - # CFI tests require diagnostic mode, which is implemented in UBSan. - if(COMPILER_RT_HAS_UBSAN) - add_subdirectory(cfi) - endif() - if(COMPILER_RT_HAS_SAFESTACK) - add_subdirectory(safestack) - endif() + foreach(runtime ${COMPILER_RT_RUNTIMES_TO_BUILD}) + add_subdirectory(${runtime}) + endforeach() endif() if(COMPILER_RT_STANDALONE_BUILD) @@ -79,3 +51,4 @@ if(COMPILER_RT_STANDALONE_BUILD) ${LLVM_LIT_TESTSUITES} DEPENDS ${LLVM_LIT_DEPENDS}) endif() + -- cgit v1.2.3