diff options
author | Brad King <brad.king@kitware.com> | 2017-05-18 12:47:43 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-05-18 12:47:47 (GMT) |
commit | cb8325fb4a63509dcebad8a00446fb13f8526247 (patch) | |
tree | 90f5bee5eb54ed351a33d40e1e622fa881d6f0c1 /Source | |
parent | 373887162654781c25c9ddd9f6f671da4c65d206 (diff) | |
parent | b554caf75331ef8f185cdd8c7e7b5672acd8e6d7 (diff) | |
download | CMake-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.cxx | 4 |
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 = |