Skip to content

Commit 51c483f

Browse files
zhichenxu-metafacebook-github-bot
authored andcommitted
fix(rpc): Fix CMake header-only library targets for velox_rpc_types and velox_rpc_client (#16748)
Summary: #16748 velox_rpc_types and velox_rpc_client are header-only libraries (no .cpp source files). Without the INTERFACE keyword, CMake cannot determine the linker language, causing a build failure on macOS: CMake Error: CMake can not determine linker language for target: velox_rpc_types Mark both as INTERFACE libraries and use INTERFACE linkage for velox_rpc_client dependencies. Reviewed By: xiaoxmeng Differential Revision: D96329737
1 parent fda5025 commit 51c483f

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

velox/common/rpc/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
velox_install_library_headers()
1616

17-
velox_add_library(velox_rpc_types RPCTypes.h)
17+
velox_add_library(velox_rpc_types INTERFACE RPCTypes.h)
1818

19-
velox_add_library(velox_rpc_client IRPCClient.h)
19+
velox_add_library(velox_rpc_client INTERFACE IRPCClient.h)
2020

21-
velox_link_libraries(velox_rpc_client velox_rpc_types Folly::folly)
21+
velox_link_libraries(velox_rpc_client INTERFACE velox_rpc_types Folly::folly)
2222

2323
velox_add_library(velox_mock_rpc_client clients/MockRPCClient.cpp)
2424

velox/expression/rpc/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@
1414

1515
velox_install_library_headers()
1616

17-
velox_add_library(velox_async_rpc_function AsyncRPCFunction.h)
17+
velox_add_library(velox_async_rpc_function INTERFACE AsyncRPCFunction.h)
1818

1919
velox_link_libraries(
2020
velox_async_rpc_function
21-
velox_rpc_client
22-
velox_rpc_types
23-
velox_core
24-
velox_type
25-
velox_vector
21+
INTERFACE velox_rpc_client velox_rpc_types velox_core velox_type velox_vector
2622
)

0 commit comments

Comments
 (0)