flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

[CMake] Specifying --filename-ext in FLATBUFFERS_FLATC_SCHEMA_EXTRA_ARGS before calling build_flatbuffers breaks cmake dependencies

Open jfclavette opened this issue 3 years ago • 1 comments

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:

  1. This is indeed supported
  2. Whether or not the grpc extensions should be affected too.

jfclavette avatar Jul 14 '22 21:07 jfclavette

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.

dbaileychess avatar Jul 26 '22 22:07 dbaileychess

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.

github-actions[bot] avatar Mar 04 '23 01:03 github-actions[bot]

This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.

github-actions[bot] avatar Mar 18 '23 20:03 github-actions[bot]