Skip to content

Refactor(cmake): Generate compilation database#386

Merged
alanminko merged 1 commit intoberkeley-abc:masterfrom
wjrforcyber:cmake_compilation_database
Apr 1, 2025
Merged

Refactor(cmake): Generate compilation database#386
alanminko merged 1 commit intoberkeley-abc:masterfrom
wjrforcyber:cmake_compilation_database

Conversation

@wjrforcyber
Copy link
Copy Markdown
Contributor

@wjrforcyber wjrforcyber commented Mar 12, 2025

Why

This change is not feature related, just for those who use clangd etc like me and sometimes get a missing definition error related to header file/variables/functions in editor.

What

If specify CMAKE_EXPORT_COMPILE_COMMANDS, a compilation database will be generated and when point clangd to this file it will solve definition missing error for good in editor.

How

Just turn on it in CMake. It will automatically be generated in /build folder

Signed-off-by: wjrforcyber <wjrforcyber@163.com>
@alanminko alanminko merged commit fa80e30 into berkeley-abc:master Apr 1, 2025
9 checks passed
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.

2 participants