blob: c0195c67ea18ee23991a1c061d0c7ee669e95c39 [file] [log] [blame]
# CMake file to replace the string contents in Caffe and Caffe2 proto.
# Usage example:
# cmake -DFILENAME=caffe2.pb.h -P ProtoBufPatch.cmake
file(READ ${FILENAME} content)
string(
REPLACE
"::google::protobuf::internal::GetEmptyStringAlreadyInited"
"GetEmptyStringAlreadyInited"
content
"${content}")
string(REPLACE
"namespace caffe2 {"
"namespace caffe2 { const ::std::string& GetEmptyStringAlreadyInited(); "
content
"${content}")
string(REPLACE
"namespace caffe {"
"namespace caffe { const ::std::string& GetEmptyStringAlreadyInited(); "
content
"${content}")
file(WRITE ${FILENAME} "${content}")