commit | 9575364d302eb5e6187724b122dc902041f38330 | [log] [tgz] |
---|---|---|
author | Pieter Noordhuis <pietern@fb.com> | Thu Oct 12 11:48:11 2017 -0700 |
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | Thu Oct 12 11:48:50 2017 -0700 |
tree | 254328308396edccc7941fc42d1aae07e84f648c | |
parent | 1e8a16224f2a0fff7d6fef8809f9756f690ec4ab [diff] |
Update protobuf detection 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
Caffe2 is a lightweight, modular, and scalable deep learning framework. Building on the original Caffe, Caffe2 is designed with expression, speed, and modularity in mind.
Caffe2 research award competition request for proposals
Please use Github issues (https://github.com/caffe2/caffe2/issues) to ask questions, report bugs, and request new features.
Please participate in our survey (https://www.surveymonkey.com/r/caffe2). We will send you information about new releases and special developer events/webinars.
Caffe2 is released under the Apache 2.0 license. See the NOTICE file for details.