summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/interception/tests
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2017-07-27 20:44:33 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2017-07-27 20:44:33 +0000
commit1bf535daae78809c73efc9643921c78334184dfc (patch)
tree8ddb0badab170c11372d1f310733b8eb4895da33 /compiler-rt/lib/interception/tests
parentd8bac0fa3fa6690537cb020eb01d0527918f1169 (diff)
downloadbcm5719-llvm-1bf535daae78809c73efc9643921c78334184dfc.tar.gz
bcm5719-llvm-1bf535daae78809c73efc9643921c78334184dfc.zip
Revert "[sanitizers] Sanitizer tests CMake clean up"
This reverts commit 0ab44db2aa1cd3710355ad79b04f954ce68c0b3a. Fails on some bots, reverting until I can fix it. llvm-svn: 309318
Diffstat (limited to 'compiler-rt/lib/interception/tests')
-rw-r--r--compiler-rt/lib/interception/tests/CMakeLists.txt17
1 files changed, 15 insertions, 2 deletions
diff --git a/compiler-rt/lib/interception/tests/CMakeLists.txt b/compiler-rt/lib/interception/tests/CMakeLists.txt
index 15cba152df6..5ea943f9a82 100644
--- a/compiler-rt/lib/interception/tests/CMakeLists.txt
+++ b/compiler-rt/lib/interception/tests/CMakeLists.txt
@@ -74,7 +74,16 @@ function(get_interception_lib_for_arch arch lib lib_name)
set(tgt_name "RTInterception.test.${arch}")
endif()
set(${lib} "${tgt_name}" PARENT_SCOPE)
- set(${lib_name} $<TARGET_FILE:${tgt_name}> PARENT_SCOPE)
+ if(CMAKE_CONFIGURATION_TYPES)
+ set(configuration_path "${CMAKE_CFG_INTDIR}/")
+ else()
+ set(configuration_path "")
+ endif()
+ if(NOT MSVC)
+ set(${lib_name} "${configuration_path}lib${tgt_name}.a" PARENT_SCOPE)
+ else()
+ set(${lib_name} "${configuration_path}${tgt_name}.lib" PARENT_SCOPE)
+ endif()
endfunction()
# Interception unit tests testsuite.
@@ -94,7 +103,11 @@ macro(add_interception_tests_for_arch arch)
set(INTERCEPTION_TEST_OBJECTS)
foreach(source ${INTERCEPTION_TEST_SOURCES})
get_filename_component(basename ${source} NAME)
- set(output_obj "${CMAKE_CFG_INTDIR}/${basename}.${arch}.o")
+ if(CMAKE_CONFIGURATION_TYPES)
+ set(output_obj "${CMAKE_CFG_INTDIR}/${basename}.${arch}.o")
+ else()
+ set(output_obj "${basename}.${arch}.o")
+ endif()
clang_compile(${output_obj} ${source}
CFLAGS ${INTERCEPTION_TEST_CFLAGS_COMMON} ${TARGET_FLAGS}
DEPS ${INTERCEPTION_TEST_COMPILE_DEPS})
OpenPOWER on IntegriCloud