summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-18 18:34:48 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-19 16:07:58 (GMT)
commit8bac527b0c8ada5c40171cf01f673f9597ffdb90 (patch)
tree46c8084aa72617f86af5f08d6a4a3a44c1f73ac3 /Source/cmGlobalNinjaGenerator.cxx
parentddc030f5ca20d4519559e052b7c5538cf40f34f6 (diff)
downloadCMake-8bac527b0c8ada5c40171cf01f673f9597ffdb90.zip
CMake-8bac527b0c8ada5c40171cf01f673f9597ffdb90.tar.gz
CMake-8bac527b0c8ada5c40171cf01f673f9597ffdb90.tar.bz2
cmGlobalNinjaGenerator: Re-order logic in WriteCustomCommandBuild
Save explicit dependencies earlier.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index a1a17c3..f7b338f 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -319,6 +319,14 @@ void cmGlobalNinjaGenerator::WriteCustomCommandBuild(
{
this->AddCustomCommandRule();
+ if (this->ComputingUnknownDependencies) {
+ // we need to track every dependency that comes in, since we are trying
+ // to find dependencies that are side effects of build commands
+ for (std::string const& dep : explicitDeps) {
+ this->CombinedCustomCommandExplicitDependencies.insert(dep);
+ }
+ }
+
{
cmNinjaBuild build("CUSTOM_COMMAND");
build.Comment = comment;
@@ -354,14 +362,6 @@ void cmGlobalNinjaGenerator::WriteCustomCommandBuild(
this->WriteBuild(*this->GetImplFileStream(config), build);
}
}
-
- if (this->ComputingUnknownDependencies) {
- // we need to track every dependency that comes in, since we are trying
- // to find dependencies that are side effects of build commands
- for (std::string const& dep : explicitDeps) {
- this->CombinedCustomCommandExplicitDependencies.insert(dep);
- }
- }
}
void cmGlobalNinjaGenerator::AddMacOSXContentRule()