Skip to content

Commit 0cd99c6

Browse files
peterenescumeta-codesync[bot]
authored andcommitted
build: Build LocalRunnerService prior to VeloxQueryRunner (facebookincubator#16084)
Summary: Pull Request resolved: facebookincubator#16084 Fixes build failure due to unlinked LocalRunner.h in VeloxQueryRunner Reviewed By: kgpai Differential Revision: D91153543 fbshipit-source-id: 649bcd67faa95a3f4d3cb6b2016e53eeb14f4ce1
1 parent 2660745 commit 0cd99c6

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

velox/exec/fuzzer/CMakeLists.txt

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
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+
1528
add_library(
1629
velox_fuzzer_util
1730
ReferenceQueryRunner.cpp
@@ -32,7 +45,8 @@ add_library(
3245
# https://github.com/facebookincubator/velox/issues/15414
3346
if(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})
3650
endif()
3751

3852
target_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)
222236
if(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

Comments
 (0)