summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-18 12:47:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-05-18 12:47:47 (GMT)
commitcb8325fb4a63509dcebad8a00446fb13f8526247 (patch)
tree90f5bee5eb54ed351a33d40e1e622fa881d6f0c1 /Source
parent373887162654781c25c9ddd9f6f671da4c65d206 (diff)
parentb554caf75331ef8f185cdd8c7e7b5672acd8e6d7 (diff)
downloadCMake-cb8325fb4a63509dcebad8a00446fb13f8526247.zip
CMake-cb8325fb4a63509dcebad8a00446fb13f8526247.tar.gz
CMake-cb8325fb4a63509dcebad8a00446fb13f8526247.tar.bz2
Merge topic 'ninja-compile_commands.json'
b554caf7 Ninja: List compile_commands.json as generated by CMake Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !849
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index d9a8cab..88fcb12 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -898,6 +898,10 @@ void cmGlobalNinjaGenerator::AddCXXCompileCommand(
this->GetCMakeInstance()->GetHomeOutputDirectory();
if (!this->CompileCommandsStream) {
std::string buildFilePath = buildFileDir + "/compile_commands.json";
+ if (this->ComputingUnknownDependencies) {
+ this->CombinedBuildOutputs.insert(
+ this->NinjaOutputPath("compile_commands.json"));
+ }
// Get a stream where to generate things.
this->CompileCommandsStream =