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)