mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Summary: The scripts/build_local.sh script would always build protoc from the third_party protobuf tree and override the PROTOBUF_PROTOC_EXECUTABLE CMake variable. This variable is used by the protobuf CMake files, so it doesn't let us detect whether the protoc was specified by the user or by the protobuf CMake files (e.g. an existing installation). This in turn led to a problem where system installed headers would be picked up while using protoc built from third_party. This only works if the system installed version matches the version included in the Caffe2 tree. Therefore, this commit changes the variable to specify a custom protoc executable to CAFFE2_CUSTOM_PROTOC_EXECUTABLE, and forces the use of the bundled libprotobuf when it is specified. The result is that we now EITHER specify a custom protoc (as required for cross-compilation where protoc must be compiled for the host and libprotobuf for the target architecture) and use libprotobuf from the Caffe2 tree, OR use system protobuf. If system protobuf cannot be found, we fall back to building protoc and libprotobuf in tree and packaging it as part of the Caffe2 build artifacts. Closes https://github.com/caffe2/caffe2/pull/1328 Differential Revision: D6032836 Pulled By: pietern fbshipit-source-id: b75f8dd88412f02c947dc81ca43f7b2788da51e5 |
||
|---|---|---|
| .. | ||
| appveyor | ||
| add_apache_header.sh | ||
| apache_header.txt | ||
| build_android.sh | ||
| build_host_protoc.bat | ||
| build_host_protoc.sh | ||
| build_ios.sh | ||
| build_local.sh | ||
| build_raspbian.sh | ||
| build_tegra_x1.sh | ||
| build_tizen.sh | ||
| build_windows.bat | ||
| diagnose_protobuf.py | ||
| get_python_cmake_flags.py | ||
| start_ipython_notebook.sh | ||
| temp.sh | ||