From f399c8c64213492cbca8677b79d43f0080f181e9 Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Thu, 25 Jul 2019 13:46:00 +0100 Subject: [PATCH] Feature: CMake now generates compile_commands.json This commit adds suppotr for generating a 'compile commands' JSON file. This provides fairly sufficient autocomplete support for most text editors, such as (Neo)vim and VS Code. It specifies include paths, and the compiler arguments used to compile each source file. Signed-off-by: Dom Rodriguez --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5ec96f4..1c286358 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,7 @@ project (barrier C CXX) option (BARRIER_BUILD_GUI "Build the GUI" ON) option (BARRIER_BUILD_INSTALLER "Build the installer" ON) +set (CMAKE_EXPORT_COMPILE_COMMANDS ON) set (CMAKE_CXX_STANDARD 14) set (CMAKE_CXX_EXTENSIONS OFF) set (CMAKE_CXX_STANDARD_REQUIRED ON)