[llvm] r308698 - Generate a compile_commands.json DB for external projects.
George Karpenkov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 16:46:46 PDT 2017
Author: george.karpenkov
Date: Thu Jul 20 16:46:46 2017
New Revision: 308698
URL: http://llvm.org/viewvc/llvm-project?rev=308698&view=rev
Log:
Generate a compile_commands.json DB for external projects.
compile_commands.json file is very useful both for tooling and for
reproducible builds.
For files generated from recursive CMake invocation this information was
not previously generated.
Differential Review: https://reviews.llvm.org/D35219
Modified:
llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
Modified: llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake?rev=308698&r1=308697&r2=308698&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake (original)
+++ llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake Thu Jul 20 16:46:46 2017
@@ -149,6 +149,7 @@ function(llvm_ExternalProject_Add name s
-DPACKAGE_VERSION=${PACKAGE_VERSION}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=1
${ARG_CMAKE_ARGS}
${PASSTHROUGH_VARIABLES}
INSTALL_COMMAND ""
More information about the llvm-commits
mailing list