diff options
author | Bo Yang <paulyang1211@gmail.com> | 2015-02-03 21:35:50 -0800 |
---|---|---|
committer | Bo Yang <paulyang1211@gmail.com> | 2015-02-03 21:35:50 -0800 |
commit | 5914ce7a160a82db1490e99c45c95c69417b20ea (patch) | |
tree | fdd9219543de9caf2490a1bcc10ef62ffe27d254 /src/google/protobuf/testing/file.cc | |
parent | 532c94145b6605361513682601f1d8e9f97a2497 (diff) |
Implement a feature to generate a dependency file. By giving protoc the flag
"--dependency_manifest_out=FILE", protoc will write dependencies of
input proto files into FILE. In FILE, the format will be
<full path to FILE>: <full path to 1st proto>\\\n <full path to 2nd proto> ...
This cl is based on https://github.com/google/protobuf/pull/178
Diffstat (limited to 'src/google/protobuf/testing/file.cc')
-rw-r--r-- | src/google/protobuf/testing/file.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/google/protobuf/testing/file.cc b/src/google/protobuf/testing/file.cc index 5344ec15..3d07b127 100644 --- a/src/google/protobuf/testing/file.cc +++ b/src/google/protobuf/testing/file.cc @@ -192,5 +192,9 @@ void File::DeleteRecursively(const string& name, #endif } +bool File::ChangeWorkingDirectory(const string& new_working_directory) { + return chdir(new_working_directory.c_str()) == 0; +} + } // namespace protobuf } // namespace google |