From 3e25a975ca0f268b62c1e5954a9fe387d653784b Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 19 Jan 2013 17:11:39 -0800 Subject: [PATCH] Turning on compilation_database.json generation --- cpp/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index e18a0b78..0f922f21 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -20,6 +20,11 @@ project( YouCompleteMe ) option( UNIVERSAL "Build universal mac binary" OFF ) +# Turning on this flag tells cmake to emit a compile_commands.json file. +# This file can be used to load compilation flags into YCM. See here for more +# details: http://clang.llvm.org/docs/JSONCompilationDatabase.html +set( CMAKE_EXPORT_COMPILE_COMMANDS 1 ) + # This is needed so that on macs, the library is built in both 32 bit and 64 bit # versions. Without this python might refuse to load the module, depending on # how python was built.