From a3c641d9f9bc6d768540b78913945c23691c9009 Mon Sep 17 00:00:00 2001 From: Andrei-Fabian-Pop Date: Tue, 3 Dec 2024 11:20:03 +0200 Subject: [PATCH] CMakeLists: Add CMAKE_EXPORT_COMPILE_COMMANDS flag Signed-off-by: Andrei-Fabian-Pop --- .gitignore | 1 + CMakeLists.txt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index a90b0c196c..986eade830 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,4 @@ gui/include/gui/style_properties.h gui/include/gui/style_attributes.h *style_properties.h *style_attributes.h +compile_commands.json diff --git a/CMakeLists.txt b/CMakeLists.txt index d8e6a51af5..d999f11fe8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,9 @@ else() message(STATUS "Not using ccache.") endif() +# Create the "compile_commands.json" file +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # Make sure our local CMake Modules path comes first list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake/Modules)