diff --git a/CMakeLists.txt b/CMakeLists.txt index febd1efe..9b400a26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -624,6 +624,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/thrift/frozen.thrift ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/ COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1 + -I ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift -o ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift --gen mstch_cpp2 frozen.thrift @@ -645,6 +646,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/thrift/metadata.thrift ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/metadata.thrift COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1 + -I ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift -o ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs --gen mstch_cpp2:frozen2 metadata.thrift diff --git a/thrift/metadata.thrift b/thrift/metadata.thrift index bb9a5b7c..0872bcbc 100644 --- a/thrift/metadata.thrift +++ b/thrift/metadata.thrift @@ -19,11 +19,16 @@ * along with dwarfs. If not, see . */ +include "thrift/annotation/cpp.thrift" + namespace cpp2 dwarfs.thrift.metadata -typedef i16 (cpp2.type = "uint16_t") UInt16 -typedef i32 (cpp2.type = "uint32_t") UInt32 -typedef i64 (cpp2.type = "uint64_t") UInt64 +@cpp.Type{name = "uint16_t"} +typedef i16 UInt16 +@cpp.Type{name = "uint32_t"} +typedef i32 UInt32 +@cpp.Type{name = "uint64_t"} +typedef i64 UInt64 /** * One chunk of data