diff options
author | Wouter van Oortmerssen <wvo@google.com> | 2014-09-11 17:13:21 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <wvo@google.com> | 2014-09-15 16:19:27 -0700 |
commit | e57b86bb9f17cabc5bf5b4afe78153dde55f46ea (patch) | |
tree | 425e367951d7ae74aba5af9d14e5ff6a0fd80018 /samples | |
parent | cb58fc6fa13fc632ebb50225aaedaa2c68ac3094 (diff) | |
download | flatbuffers-e57b86bb9f17cabc5bf5b4afe78153dde55f46ea.tar.gz |
The parser and flatc now allow include directories to be specified.
Bug: 17139854
Change-Id: I0eac65d054951e00a8811ad1d80ba8c37012dbf0
Tested: on Linux.
Diffstat (limited to 'samples')
-rwxr-xr-x | samples/sample_text.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/samples/sample_text.cpp b/samples/sample_text.cpp index 33cb58e1..88d761cb 100755 --- a/samples/sample_text.cpp +++ b/samples/sample_text.cpp @@ -37,8 +37,9 @@ int main(int /*argc*/, const char * /*argv*/[]) { // parse schema first, so we can use it to parse the data after flatbuffers::Parser parser; - ok = parser.Parse(schemafile.c_str(), "samples/") && - parser.Parse(jsonfile.c_str(), "samples/"); + const char *include_directories[] = { "samples", nullptr }; + ok = parser.Parse(schemafile.c_str(), include_directories) && + parser.Parse(jsonfile.c_str(), include_directories); assert(ok); // here, parser.builder_ contains a binary buffer that is the parsed data. |