mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Added --keep-prefix to not strip schema include path in C++ includes.
Change-Id: I3c6356fc6664072796f273096df64829108b4a34 Tested: on Linux.
This commit is contained in:
@@ -72,8 +72,9 @@ class CppGenerator : public BaseGenerator {
|
||||
}
|
||||
for (auto it = parser_.included_files_.begin();
|
||||
it != parser_.included_files_.end(); ++it) {
|
||||
const auto basename =
|
||||
flatbuffers::StripPath(flatbuffers::StripExtension(it->first));
|
||||
auto basename = flatbuffers::StripExtension(it->first);
|
||||
if (!parser_.opts.keep_include_path)
|
||||
basename = flatbuffers::StripPath(basename);
|
||||
if (basename != file_name_) {
|
||||
code_ += "#include \"" + parser_.opts.include_prefix + basename +
|
||||
"_generated.h\"";
|
||||
|
||||
Reference in New Issue
Block a user