Argument: this is a not a good practice and the operation might face many practical problems
-
We don't to have to clone the whole tensorflow project, only the released one. The URL specified in cmake/TensorflowBase.cmake is incorrect! (git repo ssh address with a shallow depth). Or we can just use URL key word to fetch the released tar.gz files.
-
native cmake does not support curl with https. And there might be other factors like git cache. proxy server causing permanent hung In command line
-
User can provide the released source code of tensorflow without downloading it.
A temporal work around
Solution 1
change "cmake/TensorflowBase.cmake", comment the lines :
ExternalProject_Add(
tensorflow_base
# GIT_REPOSITORY https://github.com/tensorflow/tensorflow.git
# GIT_TAG "${TENSORFLOW_TAG}"
# TMP_DIR "/tmp"
# STAMP_DIR "tensorflow-stamp"
# DOWNLOAD_DIR "tensorflow"
SOURCE_DIR "${TENSORFLOW_SOURCE}"
BUILD_IN_SOURCE 1
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND "${CMAKE_CURRENT_BINARY_DIR}/build_tensorflow.sh"
INSTALL_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/cmake/copy_links.sh" bazel-bin
)
Solution 2
Or equivalently, copy the generated "build/build_tensorflow.sh" to the source folder of downloaded tensorflow.
Conclusion
Drop the ExternalProject_Add and using shell commands, execute_process to do the relevant jobs.
Argument: this is a not a good practice and the operation might face many practical problems
We don't to have to clone the whole tensorflow project, only the released one. The URL specified in cmake/TensorflowBase.cmake is incorrect! (git repo ssh address with a shallow depth). Or we can just use URL key word to fetch the released tar.gz files.
native cmake does not support curl with https. And there might be other factors like git cache. proxy server causing permanent hung In command line
User can provide the released source code of tensorflow without downloading it.
A temporal work around
Solution 1
change "cmake/TensorflowBase.cmake", comment the lines :
Solution 2
Or equivalently, copy the generated "build/build_tensorflow.sh" to the source folder of downloaded tensorflow.
Conclusion
Drop the ExternalProject_Add and using shell commands, execute_process to do the relevant jobs.