1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ # Generate Thrift library for LocalRunnerService early since velox_fuzzer_util
16+ # depends on it when VELOX_ENABLE_REMOTE_FUNCTIONS is enabled.
17+ if (VELOX_ENABLE_REMOTE_FUNCTIONS)
18+ include (FBThriftCppLibrary)
19+ add_fbthrift_cpp_library(
20+ local_runner_service_thrift
21+ if /LocalRunnerService.thrift
22+ SERVICES
23+ LocalRunnerService
24+ )
25+ target_compile_options (local_runner_service_thrift PRIVATE -Wno-error=deprecated-declarations)
26+ endif ()
27+
1528add_library (
1629 velox_fuzzer_util
1730 ReferenceQueryRunner.cpp
@@ -32,7 +45,8 @@ add_library(
3245# https://github.com/facebookincubator/velox/issues/15414
3346if (VELOX_ENABLE_REMOTE_FUNCTIONS)
3447 target_sources (velox_fuzzer_util PRIVATE VeloxQueryRunner.cpp)
35- target_link_libraries (velox_fuzzer_util FBThrift::thriftcpp2)
48+ target_link_libraries (velox_fuzzer_util local_runner_service_thrift)
49+ target_include_directories (velox_fuzzer_util PUBLIC ${CMAKE_CURRENT_BINARY_DIR} )
3650endif ()
3751
3852target_link_libraries (
@@ -218,20 +232,8 @@ target_link_libraries(
218232 velox_vector_fuzzer
219233)
220234
221- # LocalRunnerService (requires FBThrift support)
235+ # LocalRunnerService Library (requires FBThrift support)
222236if (VELOX_ENABLE_REMOTE_FUNCTIONS)
223- # Generate Thrift library for LocalRunnerService
224- include (FBThriftCppLibrary)
225- add_fbthrift_cpp_library(
226- local_runner_service_thrift
227- if /LocalRunnerService.thrift
228- SERVICES
229- LocalRunnerService
230- )
231-
232- target_compile_options (local_runner_service_thrift PRIVATE -Wno-error=deprecated-declarations)
233-
234- # LocalRunnerService Library
235237 add_library (velox_local_runner_service_lib LocalRunnerService.cpp)
236238
237239 target_link_libraries (
0 commit comments