summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2017-04-18 18:11:40 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2017-04-21 12:57:02 (GMT)
commit7f947b602f00ea94161c98b2887479e445d9bc92 (patch)
treefb2ba6914e76f5fbd23ba18a685391c4d65a27ad /Source/cmNinjaTargetGenerator.cxx
parente9827eba686c431e393cea6dcd71fe25f1eda98f (diff)
downloadCMake-7f947b602f00ea94161c98b2887479e445d9bc92.zip
CMake-7f947b602f00ea94161c98b2887479e445d9bc92.tar.gz
CMake-7f947b602f00ea94161c98b2887479e445d9bc92.tar.bz2
ninja: remove duplicate order-only dependencies
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 7fbb2fc..daad3fc 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -737,6 +737,10 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements()
std::back_inserter(orderOnlyDeps), MapToNinjaPath());
}
+ std::sort(orderOnlyDeps.begin(), orderOnlyDeps.end());
+ orderOnlyDeps.erase(std::unique(orderOnlyDeps.begin(), orderOnlyDeps.end()),
+ orderOnlyDeps.end());
+
if (!orderOnlyDeps.empty()) {
cmNinjaDeps orderOnlyTarget;
orderOnlyTarget.push_back(this->OrderDependsTargetForTarget());