diff options
author | Thomas <maierbacher@gmail.com> | 2018-09-22 01:53:59 +0200 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2018-09-21 16:53:59 -0700 |
commit | 33791dc7b0fcfa31781875753dcd716e50d41283 (patch) | |
tree | b4611ab048e51335fdf37a44d7da7e97495fbba9 /CMakeLists.txt | |
parent | 873a60b0d877822f8ac7258b69910a30a289ad70 (diff) | |
download | flatbuffers-33791dc7b0fcfa31781875753dcd716e50d41283.tar.gz flatbuffers-33791dc7b0fcfa31781875753dcd716e50d41283.tar.bz2 flatbuffers-33791dc7b0fcfa31781875753dcd716e50d41283.zip |
Add compare operator to code generated for c++ (#4940)
* Add operator== for c++ genated code
New "--gen-compare" option for flatc to generate compare operators. The operators are defined based on object based api types.
Inspired by issue #263.
* Improve compare operator for c++.
Thanks for the code review.
- Improve robustness against future schema extensions
- Code style
- Fix --rust generation in generate_code.sh
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 122009b6..3d224fe2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -223,7 +223,7 @@ function(compile_flatbuffers_schema_to_cpp SRC_FBS) add_custom_command( OUTPUT ${GEN_HEADER} COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable - --gen-object-api -o "${SRC_FBS_DIR}" + --gen-object-api --gen-compare -o "${SRC_FBS_DIR}" --cpp-ptr-type flatbuffers::unique_ptr # Used to test with C++98 STLs --reflect-names -I "${CMAKE_CURRENT_SOURCE_DIR}/tests/include_test" |