Open philipp-schmidt opened 8 months ago
@debermudez @matthewkotila @tgerdesnv Is this something that we could potentially add for the C++ clients?
@Tabrizian Wouldnt this change need to go into the server repo?
I have more info to share. The above code snippet misses setting the build flags for TritonClient to e.g. enable the grpc build. Doing so (via SET(...)
) will give a target TritonClient::grpcclient, but it will fail to "transitively" find the target GRPC::xxx defined by triton. Tritonclient builds grpc itself so it should be available.
I can post more detailled info in a few days.
@philipp-schmidt if you have the capacity, you can make a PR and fill out the CLA. We can test locally and verify it.
@Tabrizian Wouldnt this change need to go into the server repo?
No, I think what @philipp-schmidt is proposing is to make changes to the client repo cmakes so that it works with FetchContent
semantics.
FetchContent_Declare(
tritonclient
GIT_REPOSITORY https://github.com/triton-inference-server/client
GIT_TAG r23.05
)
set(TRITON_ENABLE_CC_GRPC ON)
FetchContent_MakeAvailable(tritonclient)
# ...
target_link_libraries(test PRIVATE TritonClient::grpcclient rt m dl)
This will actually pull the repo and start building stuff, but the output is still:
CMake Error at CMakeLists.txt:70 (target_link_libraries):
Target "test" links to:
TritonClient::grpcclient
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Is there a way to include tritonclient libraries in a CMake project via
FetchContent
? The following does not work properly.Including tritonclient via find_package will yield the target
TritonClient::grpcclient
, but via FetchContent the targets are not available.