diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-25 22:37:16 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-25 22:49:06 -0700 |
commit | e72c751e4d8100fb0068a34897b973ff3b5b7fd1 (patch) | |
tree | c8caddf27c9eb84c3b9c5dacfaf04bcc26b4a9da /src | |
parent | c80f7c6f3c51667bf7aa51ade2c816b50e857316 (diff) | |
download | protobuf-e72c751e4d8100fb0068a34897b973ff3b5b7fd1.tar.gz protobuf-e72c751e4d8100fb0068a34897b973ff3b5b7fd1.tar.bz2 protobuf-e72c751e4d8100fb0068a34897b973ff3b5b7fd1.zip |
Fix cmake build on linux.
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_unittest.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_unittest.cc b/src/google/protobuf/compiler/cpp/cpp_unittest.cc index 7840cfaf..b7b6039a 100644 --- a/src/google/protobuf/compiler/cpp/cpp_unittest.cc +++ b/src/google/protobuf/compiler/cpp/cpp_unittest.cc @@ -55,7 +55,9 @@ #include <google/protobuf/unittest.pb.h> #include <google/protobuf/unittest_optimize_for.pb.h> #include <google/protobuf/unittest_embed_optimize_for.pb.h> -#if !defined(_MSC_VER) // Too large for visual studio to compile +#if !defined(GOOGLE_PROTOBUF_CMAKE_BUILD) && !defined(_MSC_VER) +// We exclude this large proto from cmake build because it's too large for +// visual studio to compile (report internal errors). #include <google/protobuf/unittest_enormous_descriptor.pb.h> #endif #include <google/protobuf/unittest_no_generic_services.pb.h> @@ -135,7 +137,7 @@ TEST(GeneratedDescriptorTest, IdenticalDescriptors) { generated_decsriptor_proto.DebugString()); } -#if !defined(_MSC_VER) +#if !defined(GOOGLE_PROTOBUF_CMAKE_BUILD) && !defined(_MSC_VER) // Test that generated code has proper descriptors: // Touch a descriptor generated from an enormous message to validate special // handling for descriptors exceeding the C++ standard's recommended minimum |