File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ endfunction()
61
61
62
62
macro (llvm_test_verify_hash_program_output _file )
63
63
llvm_test_verify (WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
64
- ${CMAKE_SOURCE_DIR} /HashProgramOutput.sh ${_file}
64
+ ${CMAKE_BINARY_DIR} /tools /HashProgramOutput.sh ${_file}
65
65
)
66
66
endmacro ()
67
67
Original file line number Diff line number Diff line change @@ -85,7 +85,12 @@ endfunction()
85
85
# usually do not need to call this directly when using `llvm_test_executable`
86
86
# or `llvm_test_library`.
87
87
function (test_suite_add_build_dependencies target )
88
- add_dependencies (${target} build -timeit build -timeit-target build -fpcmp )
88
+ add_dependencies (${target}
89
+ build -HashProgramOutput.sh
90
+ build -fpcmp
91
+ build -timeit
92
+ build -timeit-target
93
+ )
89
94
endfunction ()
90
95
91
96
# Internal function that transforms a list of flags to a string and appends
Original file line number Diff line number Diff line change 1
1
# Note that we have to compile fpcmp and timeit for the host machine even when
2
- # cross compiling to a different target. We use custom rules doing "cc file.c"
3
- # as an ad-hoc solution for now. A proper solution would probably be based on
4
- # ExternalProject_Add(); See also http://reviews.llvm.org/D15004
2
+ # cross compiling to a different target. We use custom rules doing a simple
3
+ # "cc file.c".
5
4
6
5
include (Host )
7
6
8
7
llvm_add_host_executable (build -fpcmp fpcmp fpcmp.c )
9
8
9
+ add_custom_command (
10
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /HashProgramOutput.sh
11
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR} /../HashProgramOutput.sh ${CMAKE_CURRENT_BINARY_DIR} /HashProgramOutput.sh
12
+ COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR} /HashProgramOutput.sh
13
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR} /../HashProgramOutput.sh
14
+ )
15
+ add_custom_target (build -HashProgramOutput.sh DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /HashProgramOutput.sh )
16
+
10
17
option (TEST_SUITE_USE_PERF "Use perf (timeit.sh) instead of timeit.c" OFF )
11
18
if (TEST_SUITE_USE_PERF )
12
19
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /timeit
You can’t perform that action at this time.
0 commit comments