Skip to content

[cmake] Add helper options to flatbuffers_generate_headers()#9053

Open
alexv-ds wants to merge 1 commit intogoogle:masterfrom
alexv-ds:cmake-improvements
Open

[cmake] Add helper options to flatbuffers_generate_headers()#9053
alexv-ds wants to merge 1 commit intogoogle:masterfrom
alexv-ds:cmake-improvements

Conversation

@alexv-ds
Copy link
Copy Markdown

Description

Added helper options to flatbuffers_generate_headers()

  • FILENAME_SUFFIX - adds --filename-suffix argument to flatc
  • NO_FILENAME_SUFFIX - adds --filename-suffix "" (empty string) to flatc. This option exists separately from FILENAME_SUFFIX because passing an empty string became possible only in cmake 3.31.
  • FILENAME_EXT - adds --filename-ext argument to flatc

Motivation

This is needed for correct cmake dependency tracking. If the corresponding parameters are added through FLAGS, cmake starts tracking a file that will never be generated. As a result, the headers are regenerated on every build.

@alexv-ds alexv-ds requested a review from dbaileychess as a code owner April 19, 2026 12:25
@google-cla
Copy link
Copy Markdown

google-cla Bot commented Apr 19, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant