From 64a0e3f1e4a5a8e3070eeadae0f6942b290c2974 Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Mon, 1 Oct 2018 16:37:15 -0700 Subject: [PATCH] cmake: Generate compile_commands.json on configure. (#2559) --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a42406dad..e850f9928 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,10 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) set(CMAKE_C_STANDARD 99) set(CMAKE_CXX_STANDARD 11) +# Generate compile_commands.json, which can be used for various code completion +# plugins. +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + #-----------------------------------------------------------------------------# include(Helpers) -- 2.30.2