diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2017-07-27 18:40:38 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2017-07-27 18:40:38 +0000 |
commit | fa4969a72758e98246cb7ee4e8178bca5dd5250a (patch) | |
tree | d4cdf466a4af3dc0c59f1aa4fe009259698f1d29 /cmake/Modules | |
parent | 861f5212c5583d72b48c528657bffc5aafe2a7c0 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309306 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index bc5fb9ff7..2366195ab 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -301,10 +301,7 @@ macro(add_compiler_rt_test test_suite test_name) if(TEST_SUBDIR) set(output_bin "${output_bin}/${TEST_SUBDIR}") endif() - if(CMAKE_CONFIGURATION_TYPES) - set(output_bin "${output_bin}/${CMAKE_CFG_INTDIR}") - endif() - set(output_bin "${output_bin}/${test_name}") + set(output_bin "${output_bin}/${CMAKE_CFG_INTDIR}/${test_name}") if(MSVC) set(output_bin "${output_bin}.exe") endif() |