diff mbox series

[2/3] cmake.bbclass: inherit compile_commands.bbclass

Message ID 20250803010422.21838-4-anakin@childerhose.ca
State New
Headers show
Series Automatically add compile_commands.json to ${S} | expand

Commit Message

Anakin Childerhose Aug. 3, 2025, 1:04 a.m. UTC
cmake.bbclass generates a compile_commands.json file by default in ${B}.
To automatically configure the clangd language server, link the
compile_commands.json file to ${S} via compile_commands.bbclass.

Signed-off-by: Anakin Childerhose <anakin@childerhose.ca>
---
 meta/classes-recipe/cmake.bbclass | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta/classes-recipe/cmake.bbclass b/meta/classes-recipe/cmake.bbclass
index 1488d744d4..2da4a9a6c5 100644
--- a/meta/classes-recipe/cmake.bbclass
+++ b/meta/classes-recipe/cmake.bbclass
@@ -4,6 +4,8 @@ 
 # SPDX-License-Identifier: MIT
 #
 
+inherit compile_commands
+
 # Path to the CMake file to process.
 OECMAKE_SOURCEPATH ??= "${S}"