[sanitizer tests CMake] Factor out CMake logic for compiling sanitizer tests
authorGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 28 Jul 2017 17:32:37 +0000 (17:32 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 28 Jul 2017 17:32:37 +0000 (17:32 +0000)
commit831875b4bfdc691567b18391f1a8d5b33e475ad2
tree767b14b323c5f6948506e5c4d4adaba137958fa9
parenta7f583e33bb5432f9c03ae87411e741d7ac3c2c4
[sanitizer tests CMake] Factor out CMake logic for compiling sanitizer tests

Currently there's a large amount of CMake logic duplication for
compiling sanitizer tests.
If we add more sanitizers, the duplication will get even worse.

This change factors out common compilation commands into a macro
available to all sanitizers.

llvm-svn: 309405
compiler-rt/cmake/Modules/CompilerRTCompile.cmake
compiler-rt/lib/asan/tests/CMakeLists.txt
compiler-rt/lib/msan/tests/CMakeLists.txt
compiler-rt/lib/tsan/tests/CMakeLists.txt
compiler-rt/lib/xray/tests/CMakeLists.txt