diff options
| -rw-r--r-- | cmake/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/google/protobuf/port_def.inc | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 71a0f37aa..ebc7b0c98 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -198,6 +198,7 @@ get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH) include_directories( ${ZLIB_INCLUDE_DIRECTORIES} ${protobuf_BINARY_DIR} + ${protobuf_source_dir}/android ${protobuf_source_dir}/src) if (MSVC) diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 57a2209e0..df08f7957 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -297,9 +297,18 @@ // ANDROID: autotdetect RTTI. Managing RTTI through command line -D // parameters is hard across modules, just autodetect it. #undef GOOGLE_PROTOBUF_NO_RTTI + +#if defined(__clang__) #if !__has_feature(cxx_rtti) #define GOOGLE_PROTOBUF_NO_RTTI 1 #endif +#elif defined(__GNUC__) +#if !defined(__GXX_RTTI) +#define GOOGLE_PROTOBUF_NO_RTTI 1 +#endif +#else +#define GOOGLE_PROTOBUF_NO_RTTI 1 +#endif #if defined(GOOGLE_PROTOBUF_NO_RTTI) && GOOGLE_PROTOBUF_NO_RTTI #define PROTOBUF_RTTI 0 |
