summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-12-16 18:17:45 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-12-16 18:17:45 +0000
commit2c5712051b31b316a9fc972f692579bd8efa6e67 (patch)
treec3dc6d8db7bd1f8fc2d96e0f475885b035d3a3ca /llvm
parente2831b4e27f0c5e59b8f1011101c927958bb3d39 (diff)
downloadbcm5719-llvm-2c5712051b31b316a9fc972f692579bd8efa6e67.tar.gz
bcm5719-llvm-2c5712051b31b316a9fc972f692579bd8efa6e67.zip
Generate a clang CompilationDatabase when running CMake
This generates a compile_commands.json file, which tells tools like YouCompleteMe and clang_complete exactly how to build each source file. Patch by Justin Lebar! llvm-svn: 255789
Diffstat (limited to 'llvm')
-rw-r--r--llvm/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index c4ff8f3cd28..3d2093fde63 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -86,6 +86,10 @@ set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
)
+# Generate a CompilationDatabase (compile_commands.json file) for our build,
+# for use by clang_complete, YouCompleteMe, etc.
+set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
+
option(LLVM_INSTALL_UTILS "Include utility binaries in the 'install' target." OFF)
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
OpenPOWER on IntegriCloud