Skip to content

GH-36124: [C++] Export compile_commands.json by default#37426

Merged
kou merged 1 commit intoapache:mainfrom
bkietz:36124-default-export-compile-commands
Aug 28, 2023
Merged

GH-36124: [C++] Export compile_commands.json by default#37426
kou merged 1 commit intoapache:mainfrom
bkietz:36124-default-export-compile-commands

Conversation

@bkietz
Copy link
Member

@bkietz bkietz commented Aug 28, 2023

CMakePresets.json does not export compile_commands.json by default, which is used by all clang tooling. Adding it as a default ensures that new developers (or any others who forget to specifically specify the option) will still be able to use their language servers without regenerating the cmake build dir.

The relevant option is "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", and causes generation of a ~1MB file at build time.

@bkietz bkietz changed the title [C++] Export compile_commands.json by default GH-36124: [C++] Export compile_commands.json by default Aug 28, 2023
@apache apache deleted a comment from github-actions bot Aug 28, 2023
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou kou merged commit 8e41366 into apache:main Aug 28, 2023
@kou kou removed the awaiting committer review Awaiting committer review label Aug 28, 2023
@github-actions github-actions bot added the awaiting merge Awaiting merge label Aug 28, 2023
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 8e41366.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…#37426)

`CMakePresets.json` does not export `compile_commands.json` by default, which is used by all clang tooling. Adding it as a default ensures that new developers (or any others who forget to specifically specify the option) will still be able to use their language servers without regenerating the cmake build dir.

The relevant option is `"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"`, and causes generation of a ~1MB file at build time.
* Closes: apache#36124

Authored-by: Benjamin Kietzman <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++] Export compile commands database by default

2 participants