We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db7768b commit 3a1aaf9Copy full SHA for 3a1aaf9
1 file changed
tensorflow_cc/cmake/ProtobufExternal.cmake
@@ -1,4 +1,18 @@
1
-set(PROTOBUF_ARCHIVE https://github.com/protocolbuffers/protobuf/archive/v3.9.2.zip)
+# Find the proper protobuf archive url.
2
+file(DOWNLOAD
3
+ "https://raw.githubusercontent.com/tensorflow/tensorflow/${TENSORFLOW_TAG}/tensorflow/workspace2.bzl"
4
+ "${CMAKE_CURRENT_BINARY_DIR}/tmp/workspace2.bzl"
5
+)
6
+file(READ
7
8
+ workspace2_str
9
10
+string(REGEX MATCH
11
+ "https://github.com/protocolbuffers/protobuf/archive/v[.0-9]+.zip"
12
+ PROTOBUF_ARCHIVE
13
+ "${workspace2_str}"
14
15
+message("Will build Protobuf from '${PROTOBUF_ARCHIVE}'.")
16
17
ExternalProject_Add(
18
protobuf-external
0 commit comments