mirror of https://github.com/vee1e/flatbuffers - FlatBuffers: Memory Efficient Serialization Library
Find a file
Olivier Le Doeuff d9fecc3327
[CMake] : Add precompiled header support with FLATBUFFERS_ENABLE_PCH (#5827)
* [CMake] : Add precompiled header support with FLATBUFFERS_ENABLE_PCH

FLATBUFFERS_ENABLE_PCH enable precompile headers support for 'flatbuffers' and 'flatc'. Default if OFF.
You need to set it to ON to make it work. 'cmake -DFLATBUFFERS_ENABLE_PCH=ON ..'
This will only work if CMake version is >= 3.16, because target_precompile_headers is used.
If CMake doesn't have target_precompile_headers, then nothing will happen.
This can speed up compilation time.
Precompiled header file for 'flatbuffers' is 'pch.h'
Precompiled header file for 'flatc' is 'flatc_pch.h'

* Enable FLATBUFFERS_ENABLE_PCH for VC 2017 and VS2019 builds

* [CMake]: Fix error in FLATBUFFERS_ENABLE_PCH description

* Add a function add_pch_to_target to avoid copy and pasting the same code like add_fsanitize_to_target
Move pch.h and flatc_pch.h from include/flatbuffers to include/flatbuffers/pch
Make flatc_pch.h depends on pch.h since it extend it
2020-03-27 08:35:44 -07:00
.appveyor Add support for fixed-size arrays (#5313) 2019-06-18 00:15:13 +02:00
.bazelci Don't test on Ubuntu 14.04 (#5302) 2019-04-24 10:28:35 -07:00
.github Improved pull request & clang-format instructions. 2019-11-07 14:37:33 -08:00
.travis Add CMake 'generated_code' target to simplify resolution of build dependencies (#5697) 2020-01-06 15:26:41 -08:00
android Removed code_generators.cpp from library targets 2020-01-02 08:50:39 -08:00
CMake Added flatbuffers_generate_headers and flatbuffers_generate_binary_files cmake functions. (#5830) 2020-03-27 08:33:12 -07:00
conan
dart pre-tag version bump for 1.12 2020-03-12 15:33:39 -07:00
docs Fix float_constant definition in './doc/Grammar.md` (#5828) 2020-03-23 09:51:57 -07:00
go [Go] Implements a SharedStrings function (#5733) 2020-01-24 09:57:34 -08:00
grpc updated maven build files 2020-03-16 11:33:42 -07:00
include/flatbuffers [CMake] : Add precompiled header support with FLATBUFFERS_ENABLE_PCH (#5827) 2020-03-27 08:35:44 -07:00
java/com/google/flatbuffers pre-tag version bump for 1.12 2020-03-12 15:33:39 -07:00
js Add non-nullable modifier to return type of functions never returning null (#5797) 2020-03-12 09:02:29 -07:00
lobster Lobster: added builder API for tables 2019-05-22 19:42:13 -07:00
lua Lua cleanup (#5624) 2019-11-14 15:46:46 -08:00
net/FlatBuffers pre-tag version bump for 1.12 2020-03-12 15:33:39 -07:00
php
python Fix Python min alignment 2020-03-09 16:46:41 -07:00
reflection Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case. (#5777) 2020-02-27 12:59:43 -08:00
rust/flatbuffers pre-tag version bump for 1.12 2020-03-12 15:33:39 -07:00
samples Fix Clang-trunk warnings about special members deprecated in C++20. (#5829) 2020-03-23 10:01:11 -07:00
snap [snap] Fix versioning (#5727) 2020-02-13 08:05:21 -08:00
src Fix Clang-trunk warnings about special members deprecated in C++20. (#5829) 2020-03-23 10:01:11 -07:00
swift [Scripts] Adds swift to generated code (#5806) 2020-03-16 11:55:59 -07:00
tests Correct calculation of vector element size (#5831) 2020-03-26 08:54:52 -07:00
.clang-format
.editorconfig Unify line ending rules in '.editorconfig' and '.gitattributes' (#5231) 2019-03-18 12:47:07 -07:00
.gitattributes Unify line ending rules in '.editorconfig' and '.gitattributes' (#5231) 2019-03-18 12:47:07 -07:00
.gitignore Added --filename-suffix and --filename-ext to flatc (#5778) 2020-03-02 10:15:23 -08:00
.travis.yml Add --clean-first to the cmake-build command (travis) (#5574) 2019-10-21 10:11:32 -07:00
appveyor.yml [CMake] : Add precompiled header support with FLATBUFFERS_ENABLE_PCH (#5827) 2020-03-27 08:35:44 -07:00
BUILD Split Bazel targets into multiple packages (#5640) 2019-12-02 14:14:48 -08:00
build_defs.bzl [Bazel] Add support for compatible_with and restricted_to (#5681) 2019-12-26 09:58:48 -08:00
CMakeLists.txt [CMake] : Add precompiled header support with FLATBUFFERS_ENABLE_PCH (#5827) 2020-03-27 08:35:44 -07:00
composer.json
conanfile.py
CONTRIBUTING.md
LICENSE.txt Fixed Apache license not using canonical version. 2019-11-04 17:15:56 -08:00
package.json pre-tag version bump for 1.12 2020-03-12 15:33:39 -07:00
pom.xml updated maven build files 2020-03-16 11:33:42 -07:00
readme.md Minor doc updates: FlexBuffers C#, Discord, CppUsage. 2019-12-26 12:36:41 -08:00
WORKSPACE Upgrade rules_go (#5684) 2019-12-26 10:07:15 -08:00

logo FlatBuffers

Build Status Build status Join the chat at https://gitter.im/google/flatbuffers Discord Chat Twitter Follow

FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility.

Go to our landing page to browse our documentation.

Supported operating systems

  • Windows
  • MacOS X
  • Linux
  • Android
  • And any others with a recent C++ compiler.

Supported programming languages

  • C++
  • C#
  • C
  • Dart
  • Go
  • Java
  • JavaScript
  • Lobster
  • Lua
  • PHP
  • Python
  • Rust
  • TypeScript

and more in progress...

Contribution

To contribute to this project, see CONTRIBUTING.

Licensing

Flatbuffers is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.