Added (for compiler versions that support it):
-Wmissing-declarations
-Wzero-as-null-pointer-constant
Then, fixes to problems identified by the extra warnings
Tested only on GCC 9.4.0
Adjusted the CPP code generator to output nullptr where appropriate,
to satisfy -Wzero-as-null-pointer-constant
Added a lot of 'static' declarations in front of functions,
to satisfy -Wmissing-declarations,
and wrap static function defs in anonymous namespaces.
There are advantages to both anonymous namespaces and static,
it seems that marking a function as static will not publish the name in
the symbol table at all, thus giving the linker less work to do.
* CMake find_package fixes (#7323)
Rename FlatbuffersConfigVersion.cmake to match CMake project name
* CMake find_package fixes (#7323)
Rename FlatBuffersTargets to match CMake project name
Introduce a MSVC_LIKE variable in the CMake scripts, set that variable to
true only if the compiler is either MSVC or tries to emulate the MSVC
command line, and test that variable when setting compiler arguments.
Tested with cmake .. -G Ninja -DCMAKE_C_COMPILER:PATH="clang-cl.exe" -DCMAKE_CXX_COMPILER:PATH="clang-cl.exe" -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_CPP17=ON
Co-authored-by: Kaiyi Li <kaiyili@google.com>
* Started to migrate to target_compile_options
* combined compile options together. Added Mac CI builds
* remove arm build (not supported). Fixed old-style-casts
* moved to using a ProjectConfig interface library to specify options
* remove the explicit CMAKE_CXX_STANDARD
* code gen flexbuffer verifier
* remove verify nested flexbuffers from flexbuffers
* made function static, and placed higher in file
* moved function to own header
* Apply Namer to Lua bfbs code gen
* refactor namer into IdlNamer to keep idl includes separate
* remove commented out code
* added bfbs_namer
* remove Enum case
* add to bazel
* Emit include for bfbs-gen-embed
* Use python3 explicitly
* bump min python version to 3.6
* Sort find_package for python
* try casting Path to string
* cast WindowsPath to string to please CI
* stringify the wrong thing
* another stringify path
* Moved the CMake check for Clang *after* the one for MSVC, as clang-cl
matches both Clang and MSVC.
* Removed /MP definition - controlled by CMake
* Added CPP define for _CRT_SECURE_NO_WARNINGS so clang can see it
(it seems it doesnt pick up the pragma in util.cpp)
* initial hack to get new Lua generator into flatc
* Starting to output enum defs for Lua
* Continue to work on table generation for Lua
* Finished basic getter access for Lua
* Added ability to get object by index
* Finished struct builder
* aliased reflection to r
* finish table builder generation
* register requiring files
* better generated header info
* Tying up loose ends
* Updated reflection to handle struct padding
* Addd type sizes to reflection
* Fixed some vector indirect issues
* Lua tests passed
* Misc cleanup
* ci fixes 1
* ci fixes 2
* renaming
* up size of type sizes
* manually ran clang-format-11 -i src/idl_parser.cpp
* fixed some windows casting
* remove stupid auto import
* more static_casting
* remove std
* update other build environments
* remove scoped enums
* replaced std::to_string with NumToString
* more win fixes
* more win fixes
* replaced old lua with new
* removed auto import
* review responses
* more style fixes
* refactor bfbs_gen_len to use code +=
* added consts
* fix lambda capture for windows
* remove unused return type
* removed test/generate_code.{sh|bat}
remove c++0x from generate_code.py
added check generate code script in python
add windows specific call
added flags to generate_code.py
Set c++-0x on BUILD_LEGACY
Skip generating monster_extra if requested
* added option to skip monster extra
* add conditional to skip 2010 check gen
* Added Google benchmarks (and gtests)
* Default building benchmarks to OFF as it requires c++11
* Separate benchmark CMakeLists.txt to its own file
* Move output directory to target just flatbenchmark
* split flatbuffers.h into separate files
* wrong variable in cmakelists for android
* readded two accidentally deleted includes
* created buffer.h and moved buffer related things over
This allows building FlatBuffers with gcc on macOS:
- avoid linking libc++ when not using clang
- look at compiler first, then OS-specific options
Signed-off-by: Rafal Kapuscik <rkapuscik@antmicro.com>
* Add the file a symbol is declared in to Reflection
If we move a code-generator to depend on Reflection,
it may need to know which file something was declared in
to properly name generated files.
* Doc comments in reflection, and more precise tests
* Add --project-root flag to flatc, normalize declaraion_file to this root
* fix --project-root stuff
* posixpath
* fix scripts
* format
* rename --project-root to --bfbs-filenames
Also, make it optional, rather than defaulting to `./`, if its not
specified, then don't serialize the filenames.
* bfbs generation
* fix some tests
* uncomment a thing
* add to project root directory conditionally
* fix
* git clang format
* Added help description and removed != nullptr
* "
* Remove accidental change to docs
* Remove accidental change to docs
* Pool strings
Co-authored-by: Casper Neo <cneo@google.com>
Refactored python grpc code gen
Adds example server & client + fixes ci
Fixes generated code
Making sure we encode the reply string as utf8
Adds Readme details to clarify issue regarding encoding when python is sending/receiving
This commit enables CMake to generate a flatbuffers.pc file on install.
pkg-config eases the utilization of software libraries by enabling the
developers of a library to define how the library should be used.
It can be used as a tool by build systems to find and manage dependencies,
this is notably the default Meson behavior and optionally used by CMake.
* [Build, cmake] Add -Werror override option
This commit adds FLATBUFFERS_CXX_FLAGS cmake option.
This option allows override the -Werror flag (or any other flags).
Related issues: #6337, #5930
* Remove CMAKE_CXX_FLAGS replace option
* GRPC implementation for Typescript
* Fixes a couple of issues
* Finished implementing the typescript support for grpc
* Updated generated code
* Fixes CI