diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2017-07-28 00:50:56 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2017-07-28 00:50:56 +0000 |
commit | 33aba8c1c12302cd0e59995896a49338993022f6 (patch) | |
tree | 7f632539839fa37005821ff8b678c0d8f57f534a /cmake | |
parent | 5215325996151915d06feb6917b9b9d54ea8dec9 (diff) |
[sanitizers] Sanitizer tests CMake clean up: try #2
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@309341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-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..78663353c 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_RESOLVED_INTDIR}${test_name}") if(MSVC) set(output_bin "${output_bin}.exe") endif() |