summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVladimir Glavnyy <31897320+vglavnyy@users.noreply.github.com>2018-10-04 23:27:37 +0700
committerWouter van Oortmerssen <aardappel@gmail.com>2018-10-04 09:27:37 -0700
commit925c1d77fcc72636924c3c13428a34180c30f96f (patch)
treef8877e796a1fb7c1f9d4f6983cf0df1e80878b22 /CMakeLists.txt
parentc0698cc33f1e534bb59c455909b88cc2726089af (diff)
downloadflatbuffers-925c1d77fcc72636924c3c13428a34180c30f96f.tar.gz
flatbuffers-925c1d77fcc72636924c3c13428a34180c30f96f.tar.bz2
flatbuffers-925c1d77fcc72636924c3c13428a34180c30f96f.zip
Fix recursion counter check. Add control to override depth of nested … (#4953)
* Fix recursion counter check. Add control to override depth of nested objects. * Change if-condition to `>=`
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 76619dcb..4a6b259f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,12 @@ if(NOT FLATBUFFERS_BUILD_FLATC AND FLATBUFFERS_BUILD_TESTS)
set(FLATBUFFERS_BUILD_TESTS OFF)
endif()
+if(DEFINED FLATBUFFERS_MAX_PARSING_DEPTH)
+ # Override the default recursion depth limit.
+ add_definitions(-DFLATBUFFERS_MAX_PARSING_DEPTH=${FLATBUFFERS_MAX_PARSING_DEPTH})
+ message(STATUS "FLATBUFFERS_MAX_PARSING_DEPTH: ${FLATBUFFERS_MAX_PARSING_DEPTH}")
+endif()
+
set(FlatBuffers_Library_SRCS
include/flatbuffers/code_generators.h
include/flatbuffers/base.h