diff options
author | Vladimir Glavnyy <31897320+vglavnyy@users.noreply.github.com> | 2019-11-19 03:16:41 +0700 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-11-18 12:16:41 -0800 |
commit | 091fa1fd1b9ae8eabb99075b3ddfd9023f95468d (patch) | |
tree | 4978d4a8a33b93f46f5c8487f1e301b78932bc2a /CMakeLists.txt | |
parent | ff3781dc2d541c68122ec33c96ddf7032fcca27e (diff) | |
download | flatbuffers-091fa1fd1b9ae8eabb99075b3ddfd9023f95468d.tar.gz flatbuffers-091fa1fd1b9ae8eabb99075b3ddfd9023f95468d.tar.bz2 flatbuffers-091fa1fd1b9ae8eabb99075b3ddfd9023f95468d.zip |
Add testing of C++ with sanitizers (CI-Docker) (#5631)
* Add C++ build testing with clang and gcc
This adds Dockerfiles which test building flatc and the C++ library against clang
and gcc. See discussion at #5119. It is derived from the Travis CI tooling.
The GRPC tests are failing due to #5099 so those are commented out.
These are run from the .travis.yml file rather than the tests/docker/languages
folder because the builds may each take longer than 30 minutes and were hitting
Travis timeouts.
Parallel builds and build caching attempt to keep the build times low.
* Add GCC 8.3 and Clang 7.0 with sanitizers into CI (based on #5130)
- Add a docker based on Debian Buster.
- Add C++ building scripts for the docker.
- Leak-sanitizer requires SYS_PTRACE.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b02d45c..e7e99809 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,8 @@ option(FLATBUFFERS_BUILD_FLATLIB "Enable the build of the flatbuffers library" ON) option(FLATBUFFERS_BUILD_FLATC "Enable the build of the flatbuffers compiler" ON) +option(FLATBUFFERS_STATIC_FLATC "Build flatbuffers compiler with -static flag" + OFF) option(FLATBUFFERS_BUILD_FLATHASH "Enable the build of flathash" ON) option(FLATBUFFERS_BUILD_GRPCTEST "Enable the build of grpctest" OFF) option(FLATBUFFERS_BUILD_SHAREDLIB @@ -295,6 +297,9 @@ if(FLATBUFFERS_BUILD_FLATC) # Make flatc.exe not depend on runtime dlls for easy distribution. target_compile_options(flatc PUBLIC $<$<CONFIG:Release>:/MT>) endif() + if(FLATBUFFERS_STATIC_FLATC AND NOT MSVC) + target_link_libraries(flatc PRIVATE -static) + endif() endif() if(FLATBUFFERS_BUILD_FLATHASH) |