[PATCH] D16146: Rename fpcmp and timeit custom targets to {fpcmp, timeit}-host.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 09:44:01 PST 2016
jlebar created this revision.
jlebar added reviewers: rengolin, cmatthews, jmolloy, beanz.
jlebar added a subscriber: llvm-commits.
Ninja is displeased with the binary name matching the custom target name. We get
ninja: warning: multiple rules generate tools/fpcmp. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate tools/timeit. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
followed by many build errors because test-suite-bins/tools/timeit does not exist:
Building CXX object SingleSource/Regression/C++/CMakeFiles/2003-05-14-array-init.dir/2003-05-14-array-init.cpp.o
FAILED: /usr/local/google/home/jlebar/llvm/release/test-suite-bins/tools/timeit --summary SingleSource/Regression/C++/CMakeFiles/2003-05-14-array-init.dir/2003-05-14-array-init.cpp.o.time /usr/local/google/home/jlebar/llvm/release/./bin/clang++ -DNDEBUG -O3 -DNDEBUG -w -MMD -MT SingleSource/Regression/C++/CMakeFiles/2003-05-14-array-init.dir/2003-05-14-array-init.cpp.o -MF SingleSource/Regression/C++/CMakeFiles/2003-05-14-array-init.dir/2003-05-14-array-init.cpp.o.d -o SingleSource/Regression/C++/CMakeFiles/2003-05-14-array-init.dir/2003-05-14-array-init.cpp.o -c /usr/local/google/home/jlebar/llvm/src/projects/test-suite/SingleSource/Regression/C++/2003-05-14-array-init.cpp
/bin/sh: /usr/local/google/home/jlebar/llvm/release/test-suite-bins/tools/timeit: No such file or directory
http://reviews.llvm.org/D16146
Files:
cmake/modules/SingleMultiSource.cmake
tools/CMakeLists.txt
Index: tools/CMakeLists.txt
===================================================================
--- tools/CMakeLists.txt
+++ tools/CMakeLists.txt
@@ -9,13 +9,13 @@
set(TEST_SUITE_HOST_CC "cc" CACHE STRING "C compiler targetting the host")
mark_as_advanced(TEST_SUITE_HOST_CC)
-add_custom_target(fpcmp
+add_custom_target(fpcmp-host
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/fpcmp)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/fpcmp
COMMAND ${TEST_SUITE_HOST_CC} ${CMAKE_CURRENT_SOURCE_DIR}/fpcmp.c -o ${CMAKE_CURRENT_BINARY_DIR}/fpcmp
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/fpcmp.c
)
-add_custom_target(timeit
+add_custom_target(timeit-host
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/timeit)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/timeit
COMMAND ${TEST_SUITE_HOST_CC} ${CMAKE_CURRENT_SOURCE_DIR}/timeit.c -o ${CMAKE_CURRENT_BINARY_DIR}/timeit
Index: cmake/modules/SingleMultiSource.cmake
===================================================================
--- cmake/modules/SingleMultiSource.cmake
+++ cmake/modules/SingleMultiSource.cmake
@@ -152,7 +152,7 @@
append_cflags(${source_exename} CXXFLAGS)
append_ldflags(${source_exename} LDFLAGS)
llvm_add_test(${name} ${source_exename})
- add_dependencies(${source_exename} timeit timeit-target fpcmp)
+ add_dependencies(${source_exename} timeit-host timeit-target fpcmp-host)
endif()
endforeach()
endmacro()
@@ -181,7 +181,7 @@
append_cflags(${source_exename} CXXFLAGS)
append_ldflags(${source_exename} LDFLAGS)
llvm_add_test(${PROG} ${source_exename})
- add_dependencies(${source_exename} timeit timeit-target fpcmp)
+ add_dependencies(${source_exename} timeit-host timeit-target fpcmp-host)
endif()
endif()
endmacro()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16146.44766.patch
Type: text/x-patch
Size: 1770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160113/2ddbd302/attachment.bin>
More information about the llvm-commits
mailing list