diff mbox series

[4/4] CMakeLists.txt: enable CMAKE_EXPORT_COMPILE_COMMANDS by default

Message ID mailman.67271.1749193781.1866309.openwrt-devel@lists.openwrt.org
State New
Headers show
Series Rework CMake support | expand

Commit Message

kpursoty--- via openwrt-devel June 6, 2025, 6:55 a.m. UTC
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
From: Yegor Yefremov <yegorslists@googlemail.com>

This creates a compile_commands.json file that can then be used
by the clangd tool.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60ba81a..627690f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,9 @@  INCLUDE(CheckFunctionExists)
 
 PROJECT(ubox C)
 
+# Create compile_commands.json file
+SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
 ADD_DEFINITIONS(-Wall -Werror)
 IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
 	ADD_DEFINITIONS(-Wextra -Werror=implicit-function-declaration)