]>
Commit | Line | Data |
---|---|---|
92f5a8d4 TL |
1 | include_directories(${CMAKE_HOME_DIRECTORY}) |
2 | ||
3 | ||
4 | macro(add_code_gen_executable name) | |
5 | add_executable(${name} ${name}.cpp) | |
6 | target_link_libraries(${name} yap) | |
7 | if (clang_on_linux) | |
8 | target_link_libraries(${name} c++) | |
9 | endif () | |
10 | endmacro() | |
11 | ||
12 | add_code_gen_executable(code_gen_samples) | |
13 | add_code_gen_executable(map_assign_code_gen) | |
14 | add_code_gen_executable(lazy_vector_perf) | |
15 | ||
16 | ||
17 | macro(add_perf_executable name) | |
18 | add_executable(${name} ${name}.cpp) | |
20effc67 | 19 | add_dependencies(${name} benchmark) |
92f5a8d4 TL |
20 | target_link_libraries(${name} yap benchmark) |
21 | if (clang_on_linux) | |
22 | target_link_libraries(${name} c++) | |
23 | endif () | |
24 | endmacro() | |
25 | ||
26 | add_perf_executable(map_assign_perf) | |
27 | add_perf_executable(arithmetic_perf) | |
28 | ||
29 | include(Disassemble) | |
30 | set(disassemble_dump_targets) | |
31 | foreach(fun eval_as_cpp_expr eval_as_yap_expr eval_as_cpp_expr_4x eval_as_yap_expr_4x) | |
32 | disassemble(disassemble.arithmetic_perf.${fun} EXECUTABLE arithmetic_perf FUNCTION ${fun}) | |
33 | disassemble(disassemble.code_gen_samples.${fun} EXECUTABLE code_gen_samples FUNCTION ${fun}) | |
34 | ||
35 | add_custom_target(disass_dump.${fun} | |
36 | COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target disassemble.arithmetic_perf.${fun} | |
37 | COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target disassemble.code_gen_samples.${fun} | |
38 | ) | |
39 | list(APPEND disassemble_dump_targets disass_dump.${fun}) | |
40 | endforeach() | |
41 | ||
42 | foreach(fun get_d1_with_yap get_d1_by_hand update_v1_with_yap update_v1_by_hand) | |
43 | disassemble(disassemble.lazy_vector_perf.${fun} EXECUTABLE lazy_vector_perf FUNCTION ${fun}) | |
44 | ||
45 | add_custom_target(disass_dump.${fun} | |
46 | COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target disassemble.lazy_vector_perf.${fun} | |
47 | ) | |
48 | list(APPEND disassemble_dump_targets disass_dump.${fun}) | |
49 | endforeach() | |
50 | ||
51 | add_custom_target(perf | |
52 | COMMAND map_assign_perf | |
53 | COMMAND arithmetic_perf | |
54 | ||
55 | DEPENDS ${disassemble_dump_targets} | |
56 | ) |