Fix regression on non-systemlib builds.
Change-Id: Ie7912aba09d30bbf14557019d5d56b932fa1161f
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
else (systemlib_PROTOBUF)
set(tensorflow_EXTERNAL_LIBRARIES ${tensorflow_EXTERNAL_LIBRARIES}
${protobuf_STATIC_LIBRARIES})
+ set(APPEND tensorflow_EXTERNAL_DEPENDENCIES protobuf)
endif (systemlib_PROTOBUF)
if (systemlib_ABSEIL_CPP)
else (systemlib_GRPC)
set(tensorflow_EXTERNAL_LIBRARIES ${tensorflow_EXTERNAL_LIBRARIES}
${grpc_STATIC_LIBRARIES})
+ set(APPEND tensorflow_EXTERNAL_DEPENDENCIES grpc)
endif (systemlib_GRPC)
if(tensorflow_ENABLE_SSL_SUPPORT)
# If we hit this line, grpc is already built and installed to the system.
add_custom_target(grpc_)
add_custom_target(grpc_copy_headers_to_destination)
+ set(GRPC_DEPENDENCY grpc_)
# Locate grpc's executables for tf_core_framework.cmake.
set(GRPC_BUILD /usr/bin)
if(WIN32)
# We use unsecure gRPC because boringssl does not build on windows
set(grpc_TARGET grpc++_unsecure)
- set(grpc_DEPENDS protobuf zlib)
+ set(grpc_DEPENDS protobuf_ zlib)
set(grpc_SSL_PROVIDER NONE)
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
set(grpc_STATIC_LIBRARIES
else()
set(grpc_TARGET grpc++)
if(tensorflow_ENABLE_SSL_SUPPORT)
- set(grpc_DEPENDS boringssl protobuf zlib)
+ set(grpc_DEPENDS boringssl protobuf_ zlib)
set(grpc_SSL_PROVIDER module)
else()
- set(grpc_DEPENDS protobuf zlib)
+ set(grpc_DEPENDS protobuf_ zlib)
set(grpc_SSL_PROVIDER NONE)
endif()
set(grpc_STATIC_LIBRARIES
add_definitions(-DGRPC_ARES=0)
- ExternalProject_Add(grpc_
+ ExternalProject_Add(grpc
PREFIX grpc
DEPENDS ${grpc_DEPENDS}
GIT_REPOSITORY ${GRPC_URL}
DEPENDEES patch
DEPENDERS build
)
+ add_custom_target(grpc_)
+ set(GRPC_DEPENDENCY grpc_ grpc)
endif (systemlib_GRPC)
# If we hit this line, protobuf is already built and installed to the system.
add_custom_target(protobuf_)
add_custom_target(protobuf_copy_headers_to_destination)
+ set(PROTOBUF_DEPENDENCY protobuf_)
else (systemlib_PROTOBUF)
include (ExternalProject)
set(PROTOBUF_PROTOC_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/protobuf/src/protobuf/protoc)
endif()
- ExternalProject_Add(protobuf_
+ ExternalProject_Add(protobuf
PREFIX protobuf
DEPENDS zlib
GIT_REPOSITORY ${PROTOBUF_URL}
-Dprotobuf_MSVC_STATIC_RUNTIME:BOOL=OFF
-DZLIB_ROOT:STRING=${ZLIB_INSTALL}
)
+ add_custom_target(protobuf_)
+ set(PROTOBUF_DEPENDENCY protobuf_ protobuf)
endif (systemlib_PROTOBUF)
"${CMAKE_CURRENT_BINARY_DIR}/${REL_DIR}/${FIL_WE}.pb.h"
COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
ARGS --grpc_out ${CMAKE_CURRENT_BINARY_DIR} --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --plugin protoc-gen-grpc=${GRPC_BUILD}/grpc_cpp_plugin -I ${ROOT_DIR} ${ABS_FIL} -I ${PROTOBUF_INCLUDE_DIRS}
- DEPENDS ${ABS_FIL} protobuf_ grpc_
+ DEPENDS ${ABS_FIL} ${PROTOBUF_DEPENDENCY} ${GRPC_DEPENDENCY}
COMMENT "Running C++ protocol buffer grpc compiler on ${FIL}"
VERBATIM )
endforeach()