From fa4969a72758e98246cb7ee4e8178bca5dd5250a Mon Sep 17 00:00:00 2001 From: George Karpenkov Date: Thu, 27 Jul 2017 18:40:38 +0000 Subject: [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 --- cmake/Modules/AddCompilerRT.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cmake') 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() -- cgit v1.2.3