|
| 1 | +get_property(paddle_lib GLOBAL PROPERTY PADDLE_LIB_NAME) |
1 | 2 | set_source_files_properties(
|
2 | 3 | interceptor_ping_pong_test.cc PROPERTIES COMPILE_FLAGS
|
3 | 4 | ${DISTRIBUTE_COMPILE_FLAGS})
|
4 |
| -cc_test_old(interceptor_ping_pong_test SRCS interceptor_ping_pong_test.cc DEPS |
5 |
| - fleet_executor ${BRPC_DEPS}) |
| 5 | +if(WIN32 AND WITH_TESTING) |
| 6 | + cc_test_old(interceptor_ping_pong_test SRCS interceptor_ping_pong_test.cc |
| 7 | + DEPS fleet_executor ${BRPC_DEPS}) |
| 8 | +else() |
| 9 | + cc_test_old( |
| 10 | + interceptor_ping_pong_test |
| 11 | + SRCS |
| 12 | + interceptor_ping_pong_test.cc |
| 13 | + DEPS |
| 14 | + ${paddle_lib} |
| 15 | + python |
| 16 | + fleet_executor) |
| 17 | +endif() |
6 | 18 |
|
7 | 19 | set_source_files_properties(
|
8 | 20 | compute_interceptor_test.cc PROPERTIES COMPILE_FLAGS
|
9 | 21 | ${DISTRIBUTE_COMPILE_FLAGS})
|
10 |
| -cc_test_old(compute_interceptor_test SRCS compute_interceptor_test.cc DEPS |
11 |
| - fleet_executor ${BRPC_DEPS}) |
| 22 | + |
| 23 | +if(WIN32 AND WITH_TESTING) |
| 24 | + cc_test_old(compute_interceptor_test SRCS compute_interceptor_test.cc DEPS |
| 25 | + fleet_executor ${BRPC_DEPS}) |
| 26 | +else() |
| 27 | + cc_test_old( |
| 28 | + compute_interceptor_test |
| 29 | + SRCS |
| 30 | + compute_interceptor_test.cc |
| 31 | + DEPS |
| 32 | + ${paddle_lib} |
| 33 | + python |
| 34 | + fleet_executor) |
| 35 | +endif() |
12 | 36 |
|
13 | 37 | set_source_files_properties(
|
14 | 38 | source_interceptor_test.cc PROPERTIES COMPILE_FLAGS
|
15 | 39 | ${DISTRIBUTE_COMPILE_FLAGS})
|
16 |
| -cc_test_old(source_interceptor_test SRCS source_interceptor_test.cc DEPS |
17 |
| - fleet_executor ${BRPC_DEPS}) |
| 40 | +if(WIN32 AND WITH_TESTING) |
| 41 | + cc_test_old(source_interceptor_test SRCS source_interceptor_test.cc DEPS |
| 42 | + fleet_executor ${BRPC_DEPS}) |
| 43 | +else() |
| 44 | + cc_test_old( |
| 45 | + source_interceptor_test |
| 46 | + SRCS |
| 47 | + source_interceptor_test.cc |
| 48 | + DEPS |
| 49 | + ${paddle_lib} |
| 50 | + python |
| 51 | + fleet_executor) |
| 52 | +endif() |
18 | 53 |
|
19 | 54 | set_source_files_properties(
|
20 | 55 | sink_interceptor_test.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
|
21 |
| -cc_test_old(sink_interceptor_test SRCS sink_interceptor_test.cc DEPS |
22 |
| - fleet_executor ${BRPC_DEPS}) |
| 56 | +if(WIN32 AND WITH_TESTING) |
| 57 | + cc_test_old(sink_interceptor_test SRCS sink_interceptor_test.cc DEPS |
| 58 | + fleet_executor ${BRPC_DEPS}) |
| 59 | +else() |
| 60 | + cc_test_old( |
| 61 | + sink_interceptor_test |
| 62 | + SRCS |
| 63 | + sink_interceptor_test.cc |
| 64 | + DEPS |
| 65 | + ${paddle_lib} |
| 66 | + python |
| 67 | + fleet_executor) |
| 68 | +endif() |
23 | 69 |
|
24 | 70 | set_source_files_properties(
|
25 | 71 | interceptor_pipeline_short_path_test.cc
|
26 | 72 | PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
|
27 |
| -cc_test_old( |
28 |
| - interceptor_pipeline_short_path_test SRCS |
29 |
| - interceptor_pipeline_short_path_test.cc DEPS fleet_executor ${BRPC_DEPS}) |
| 73 | +if(WIN32 AND WITH_TESTING) |
| 74 | + cc_test_old( |
| 75 | + interceptor_pipeline_short_path_test SRCS |
| 76 | + interceptor_pipeline_short_path_test.cc DEPS fleet_executor ${BRPC_DEPS}) |
| 77 | +else() |
| 78 | + cc_test_old( |
| 79 | + interceptor_pipeline_short_path_test |
| 80 | + SRCS |
| 81 | + interceptor_pipeline_short_path_test.cc |
| 82 | + DEPS |
| 83 | + ${paddle_lib} |
| 84 | + python |
| 85 | + fleet_executor) |
| 86 | +endif() |
30 | 87 |
|
31 | 88 | set_source_files_properties(
|
32 | 89 | interceptor_pipeline_long_path_test.cc PROPERTIES COMPILE_FLAGS
|
33 | 90 | ${DISTRIBUTE_COMPILE_FLAGS})
|
34 |
| -cc_test_old( |
35 |
| - interceptor_pipeline_long_path_test SRCS |
36 |
| - interceptor_pipeline_long_path_test.cc DEPS fleet_executor ${BRPC_DEPS}) |
| 91 | +if(WIN32 AND WITH_TESTING) |
| 92 | + cc_test_old( |
| 93 | + interceptor_pipeline_long_path_test SRCS |
| 94 | + interceptor_pipeline_long_path_test.cc DEPS fleet_executor ${BRPC_DEPS}) |
| 95 | +else() |
| 96 | + cc_test_old( |
| 97 | + interceptor_pipeline_long_path_test |
| 98 | + SRCS |
| 99 | + interceptor_pipeline_long_path_test.cc |
| 100 | + DEPS |
| 101 | + ${paddle_lib} |
| 102 | + python |
| 103 | + fleet_executor) |
| 104 | +endif() |
37 | 105 |
|
38 | 106 | set_source_files_properties(
|
39 | 107 | compute_interceptor_run_op_test.cc PROPERTIES COMPILE_FLAGS
|
40 | 108 | ${DISTRIBUTE_COMPILE_FLAGS})
|
41 |
| -cc_test_old( |
42 |
| - compute_interceptor_run_op_test |
43 |
| - SRCS |
44 |
| - compute_interceptor_run_op_test.cc |
45 |
| - DEPS |
46 |
| - fleet_executor |
47 |
| - naive_executor |
48 |
| - fill_constant_op |
49 |
| - op_registry |
50 |
| - elementwise_add_op |
51 |
| - scope |
52 |
| - device_context |
53 |
| - ${BRPC_DEPS}) |
| 109 | +if(WIN32 AND WITH_TESTING) |
| 110 | + cc_test_old( |
| 111 | + compute_interceptor_run_op_test |
| 112 | + SRCS |
| 113 | + compute_interceptor_run_op_test.cc |
| 114 | + DEPS |
| 115 | + fleet_executor |
| 116 | + naive_executor |
| 117 | + fill_constant_op |
| 118 | + op_registry |
| 119 | + elementwise_add_op |
| 120 | + scope |
| 121 | + device_context |
| 122 | + ${BRPC_DEPS}) |
| 123 | +else() |
| 124 | + cc_test_old( |
| 125 | + compute_interceptor_run_op_test |
| 126 | + SRCS |
| 127 | + compute_interceptor_run_op_test.cc |
| 128 | + DEPS |
| 129 | + ${paddle_lib} |
| 130 | + python |
| 131 | + fleet_executor |
| 132 | + fill_constant_op |
| 133 | + elementwise_add_op) |
| 134 | +endif() |
54 | 135 |
|
55 | 136 | if(WITH_DISTRIBUTE AND NOT WITH_PSLIB)
|
56 | 137 | set_source_files_properties(
|
57 | 138 | interceptor_ping_pong_with_brpc_test.cc
|
58 | 139 | PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
|
59 |
| - cc_test_old( |
60 |
| - interceptor_ping_pong_with_brpc_test SRCS |
61 |
| - interceptor_ping_pong_with_brpc_test.cc DEPS fleet_executor ${BRPC_DEPS}) |
| 140 | + if(WIN32 AND WITH_TESTING) |
| 141 | + cc_test_old( |
| 142 | + interceptor_ping_pong_with_brpc_test SRCS |
| 143 | + interceptor_ping_pong_with_brpc_test.cc DEPS fleet_executor ${BRPC_DEPS}) |
| 144 | + else() |
| 145 | + cc_test_old( |
| 146 | + interceptor_ping_pong_with_brpc_test |
| 147 | + SRCS |
| 148 | + interceptor_ping_pong_with_brpc_test.cc |
| 149 | + DEPS |
| 150 | + ${paddle_lib} |
| 151 | + python |
| 152 | + fleet_executor) |
| 153 | + endif() |
62 | 154 | endif()
|
0 commit comments