From 7c362fb1b6e93e25b1f9ac9f4b2e10e5c030c107 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 28 Jan 2013 09:07:30 +0000 Subject: [PATCH] CMake: simplify build rules for compiler-rt unit tests. This fixes warnings in Ninja build tree. llvm-svn: 173677 --- compiler-rt/cmake/Modules/AddCompilerRT.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake index d084bf0..742d81f 100644 --- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake +++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake @@ -114,12 +114,10 @@ set(COMPILER_RT_GTEST_INCLUDE_CFLAGS macro(add_compiler_rt_test test_suite test_name) parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${test_name}") - add_custom_command( - OUTPUT ${output_bin} + add_custom_target(${test_name} COMMAND clang ${TEST_OBJECTS} -o "${output_bin}" ${TEST_LINK_FLAGS} DEPENDS clang ${TEST_DEPS}) - add_custom_target(${test_name} DEPENDS ${output_bin}) # Make the test suite depend on the binary. add_dependencies(${test_suite} ${test_name}) endmacro() -- 2.7.4