Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/23063 )

Change subject: [thrift] Add support for extra Thrift options to 
THRIFT_GENERATE_CPP()
......................................................................

[thrift] Add support for extra Thrift options to THRIFT_GENERATE_CPP()

The Thrift compiler's `-nowarn` flag suppresses warnings like:
  [WARNING:/data/code/kudu/src/kudu/hms/hive_metastore.thrift:2184]
  No field key specified for o2, resulting protocol may have conflicts
  or not be backwards compatible!

However, using `-nowarn` globally for all Thrift invocations would also
hide valuable warnings from unrelated files, which is discouraged by
both practice and the Thrift CLI itself.

This change introduces an `EXTRA_OPTIONS` argument to the
THRIFT_GENERATE_CPP() CMake macro, allowing per-file customization of
compiler flags.

As a first use case, the `-nowarn` flag is applied only to
`hive_metastore.thrift`, which is copied from the Hive project and
cannot be modified for compatibility reasons.

Change-Id: Ifdb8b650f9b8ed1cdea9dd0cf1a80ef264ccc7d7
Reviewed-on: http://gerrit.cloudera.org:8080/23063
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
---
M cmake_modules/FindThrift.cmake
M src/kudu/hms/CMakeLists.txt
2 files changed, 9 insertions(+), 1 deletion(-)

Approvals:
  Alexey Serbin: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/23063
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdb8b650f9b8ed1cdea9dd0cf1a80ef264ccc7d7
Gerrit-Change-Number: 23063
Gerrit-PatchSet: 7
Gerrit-Owner: KeDeng <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>

Reply via email to