[llvm-commits] [compiler-rt] r173668 - [CMake] Fix compiler-rt tests after r173617
Alexey Samsonov
samsonov at google.com
Sun Jan 27 23:16:23 PST 2013
Author: samsonov
Date: Mon Jan 28 01:16:22 2013
New Revision: 173668
URL: http://llvm.org/viewvc/llvm-project?rev=173668&view=rev
Log:
[CMake] Fix compiler-rt tests after r173617
Modified:
compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
compiler-rt/trunk/lib/msan/tests/CMakeLists.txt
compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt
Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=173668&r1=173667&r2=173668&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Mon Jan 28 01:16:22 2013
@@ -113,9 +113,7 @@ set(COMPILER_RT_GTEST_INCLUDE_CFLAGS
# LINK_FLAGS <link flags>)
macro(add_compiler_rt_test test_suite test_name)
parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN})
- set(OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
- file(MAKE_DIRECTORY ${OUTPUT_DIR})
- set(output_bin "${OUTPUT_DIR}/${test_name}")
+ set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${test_name}")
add_custom_command(
OUTPUT ${output_bin}
COMMAND clang ${TEST_OBJECTS} -o "${output_bin}"
Modified: compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/CMakeLists.txt?rev=173668&r1=173667&r2=173668&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/tests/CMakeLists.txt Mon Jan 28 01:16:22 2013
@@ -196,9 +196,8 @@ if(ANDROID)
$<TARGET_OBJECTS:asan_inst_test>
)
# Setup correct output directory and link flags.
- get_unittest_directory(OUTPUT_DIR)
set_target_properties(AsanTest PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR})
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_target_link_flags(AsanTest ${ASAN_LINK_FLAGS})
target_link_libraries(AsanTest clang_rt.asan-arm-android)
# Add unit test to test suite.
Modified: compiler-rt/trunk/lib/msan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/CMakeLists.txt?rev=173668&r1=173667&r2=173668&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/msan/tests/CMakeLists.txt Mon Jan 28 01:16:22 2013
@@ -77,9 +77,7 @@ endmacro()
macro(msan_link_shared so_list so_name arch)
parse_arguments(SOURCE "OBJECTS;LINKFLAGS;DEPS" "" ${ARGN})
- get_unittest_directory(OUTPUT_DIR)
- file(MAKE_DIRECTORY ${OUTPUT_DIR})
- set(output_so "${OUTPUT_DIR}/${so_name}.${arch}.so")
+ set(output_so "${CMAKE_CURRENT_BINARY_DIR}/${so_name}.${arch}.so")
get_target_flags_for_arch(${arch} TARGET_LINKFLAGS)
clang_link_shared(${output_so}
OBJECTS ${SOURCE_OBJECTS}
@@ -92,13 +90,12 @@ endmacro()
# of objects in ${ARGN}.
macro(add_msan_test test_suite test_name arch)
get_target_flags_for_arch(${arch} TARGET_LINK_FLAGS)
- get_unittest_directory(OUTPUT_DIR)
add_compiler_rt_test(${test_suite} ${test_name}
OBJECTS ${ARGN}
DEPS ${MSAN_RUNTIME_LIBRARIES} ${ARGN}
LINK_FLAGS ${MSAN_UNITTEST_LINK_FLAGS}
${TARGET_LINK_FLAGS}
- "-Wl,-rpath=${OUTPUT_DIR}")
+ "-Wl,-rpath=${CMAKE_CURRENT_BINARY_DIR}")
endmacro()
# Main MemorySanitizer unit tests.
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt?rev=173668&r1=173667&r2=173668&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt Mon Jan 28 01:16:22 2013
@@ -129,9 +129,8 @@ if(ANDROID)
-O2 -g
)
# Setup correct output directory and link flags.
- get_unittest_directory(OUTPUT_DIR)
set_target_properties(SanitizerTest PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR})
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_target_link_flags(SanitizerTest ${SANITIZER_TEST_LINK_FLAGS})
# Add unit test to test suite.
add_dependencies(SanitizerUnitTests SanitizerTest)
More information about the llvm-commits
mailing list