Initial reflection and resizing functionality.
Tested: on Linux.
Change-Id: I8f7bccf9b1ad87fea788f85e23fa69435758feca
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b837b71..2d48b72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,8 @@
include/flatbuffers/hash.h
include/flatbuffers/idl.h
include/flatbuffers/util.h
+ include/flatbuffers/reflection.h
+ include/flatbuffers/reflection_generated.h
src/idl_parser.cpp
src/idl_gen_cpp.cpp
src/idl_gen_general.cpp
@@ -112,6 +114,15 @@
DEPENDS flatc)
endfunction()
+function(compile_flatbuffers_schema_to_binary SRC_FBS)
+ get_filename_component(SRC_FBS_DIR ${SRC_FBS} PATH)
+ string(REGEX REPLACE "\\.fbs$" ".bfbs" GEN_BINARY_SCHEMA ${SRC_FBS})
+ add_custom_command(
+ OUTPUT ${GEN_BINARY_SCHEMA}
+ COMMAND flatc -b --schema -o "${SRC_FBS_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
+ DEPENDS flatc)
+endfunction()
+
if(FLATBUFFERS_BUILD_TESTS)
compile_flatbuffers_schema_to_cpp(tests/monster_test.fbs)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/tests)