aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/command_line_interface_unittest.cc
diff options
context:
space:
mode:
authorFeng Xiao <xiaofeng@google.com>2015-10-16 14:08:38 -0700
committerFeng Xiao <xiaofeng@google.com>2015-10-16 14:08:38 -0700
commit5314ad1b215c95b46a000794a08139d0a3077d74 (patch)
tree8aebd22910ae786aea08bdea890dbe74a4db8c15 /src/google/protobuf/compiler/command_line_interface_unittest.cc
parentbeeb3aa74ca22348df4342c50a12b0f11efcde9d (diff)
parentc3aa4c2675f993f3e6601547f03d76fd93183628 (diff)
downloadprotobuf-5314ad1b215c95b46a000794a08139d0a3077d74.tar.gz
protobuf-5314ad1b215c95b46a000794a08139d0a3077d74.tar.bz2
protobuf-5314ad1b215c95b46a000794a08139d0a3077d74.zip
Merge pull request #783 from podsvirov/topic-cmake-project
Improved CMake project
Diffstat (limited to 'src/google/protobuf/compiler/command_line_interface_unittest.cc')
-rw-r--r--src/google/protobuf/compiler/command_line_interface_unittest.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface_unittest.cc b/src/google/protobuf/compiler/command_line_interface_unittest.cc
index 46ea5c4e..fa792dae 100644
--- a/src/google/protobuf/compiler/command_line_interface_unittest.cc
+++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc
@@ -294,6 +294,10 @@ void CommandLineInterfaceTest::Run(const string& command) {
if (!disallow_plugins_) {
cli_.AllowPlugins("prefix-");
#ifndef GOOGLE_THIRD_PARTY_PROTOBUF
+ string plugin_path;
+#ifdef GOOGLE_PROTOBUF_TEST_PLUGIN_PATH
+ plugin_path = GOOGLE_PROTOBUF_TEST_PLUGIN_PATH;
+#else
const char* possible_paths[] = {
// When building with shared libraries, libtool hides the real executable
// in .libs and puts a fake wrapper in the current directory.
@@ -311,15 +315,13 @@ void CommandLineInterfaceTest::Run(const string& command) {
"test_plugin.exe", // Other Win32 (MSVC)
"test_plugin", // Unix
};
-
- string plugin_path;
-
for (int i = 0; i < GOOGLE_ARRAYSIZE(possible_paths); i++) {
if (access(possible_paths[i], F_OK) == 0) {
plugin_path = possible_paths[i];
break;
}
}
+#endif
if (plugin_path.empty()) {
#else