Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(NOT UserverGrpc_VERSION)
- try_run(
- gRPC_GET_VERSION_RUN_STATUS
- gRPC_GET_VERSION_COMPILE_STATUS
- "${CMAKE_CURRENT_BINARY_DIR}"
- "${CMAKE_CURRENT_LIST_DIR}/get_gRPC_version.cpp"
- LINK_LIBRARIES UserverGrpc
- COMPILE_OUTPUT_VARIABLE gRPC_GET_VERSION_COMPILE_OUTPUT
- RUN_OUTPUT_VARIABLE UserverGrpc_VERSION
- )
- if(NOT gRPC_GET_VERSION_COMPILE_STATUS)
- message(
- FATAL_ERROR
- "Failed to compile a gRPC version test binary: "
- "${gRPC_GET_VERSION_COMPILE_OUTPUT}"
- )
- elseif(NOT gRPC_GET_VERSION_RUN_STATUS EQUAL 0)
- message(
- FATAL_ERROR
- "Failed to run a gRPC version test binary, "
- "status=${gRPC_GET_VERSION_RUN_STATUS}"
- )
- endif()
- endif()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement