[sanitizers] Sanitizer tests CMake clean up
authorGeorge Karpenkov <ekarpenkov@apple.com>
Thu, 27 Jul 2017 18:40:38 +0000 (18:40 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Thu, 27 Jul 2017 18:40:38 +0000 (18:40 +0000)
commit165a1edc851df0522100ff37b8eeed35d3876c54
tree2cf7c8e6dd297d1325233c2f72dd01adedc0e989
parent82c7d3768d6373b1b003841f26fe6faa4eb62d37
[sanitizers] Sanitizer tests CMake clean up

This patch addresses two issues:

Most of the time, hacks with `if/else` in order to get support for
multi-configuration builds are superfluous.
The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it
expands to `.`  on all single-configuration builds, and to a configuration
name otherwise.
The `if/else` hacks for the library name generation should also not be
done, as CMake has `TARGET_FILE` generator expression precisely for this
purpose, as it expands to the exact filename of the resulting target.

Differential Revision: https://reviews.llvm.org/D35952

llvm-svn: 309306
compiler-rt/cmake/Modules/AddCompilerRT.cmake
compiler-rt/lib/asan/tests/CMakeLists.txt
compiler-rt/lib/interception/tests/CMakeLists.txt
compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt