flatbuffers
flatbuffers copied to clipboard
[CMake] Specifying --filename-ext in FLATBUFFERS_FLATC_SCHEMA_EXTRA_ARGS before calling build_flatbuffers breaks cmake dependencies
I am assuming here that FLATBUFFERS_FLATC_SCHEMA_EXTRA_ARGS is intended to be exposed to users and that I am not overstepping by setting it.
Passing, e.g. --filename-ext hpp breaks the cmake dependencies since .h is hardcoded in a few locations in BuildFlatBuffers.cmake. The same is true of _generated, but I don't believe that can be changed through flatc arguments.
See:
https://github.com/google/flatbuffers/blob/master/CMake/BuildFlatBuffers.cmake#L95 https://github.com/google/flatbuffers/blob/master/CMake/BuildFlatBuffers.cmake#L232
and potentially:
https://github.com/google/flatbuffers/blob/master/CMake/BuildFlatBuffers.cmake#L240
I can contribute a patch but I just want to insure:
- This is indeed supported
- Whether or not the grpc extensions should be affected too.
I actually don't know the purpose of FLATBUFFERS_FLATC_SCHEMA_EXTRA_ARGS, but it should be fine to update.
I would just do it for the normal flatbuffers before going into grpc extensions. Unless you need it for both.
This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.
This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.