From 82badfffc34f043521ff3314047a3831e0fb17c7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 31 May 2017 13:32:32 -0400 Subject: Ninja: Fix CMP0058 on MinGW For CMP0058 we identify dependencies that have no rules to generate them by collecting a set of all dependencies and a set of all files CMake knows are generated by something, and then computing a set difference. Fix construction of these sets to use the same form for each path. This is after ConvertToNinjaPath but before EncodePath. Without this, the slash conversion done by EncodePath for the GNU compiler on Windows results in a mismatch, triggering an incorrect CMP0058 warning. --- Source/cmGlobalNinjaGenerator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 39f5d8f..bb0b83a 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -209,7 +209,7 @@ void cmGlobalNinjaGenerator::WriteBuild( ++i) { build += " " + EncodeIdent(EncodePath(*i), os); if (this->ComputingUnknownDependencies) { - this->CombinedBuildOutputs.insert(EncodePath(*i)); + this->CombinedBuildOutputs.insert(*i); } } if (!implicitOuts.empty()) { @@ -311,7 +311,7 @@ void cmGlobalNinjaGenerator::WriteCustomCommandBuild( // we need to track every dependency that comes in, since we are trying // to find dependencies that are side effects of build commands for (cmNinjaDeps::const_iterator i = deps.begin(); i != deps.end(); ++i) { - this->CombinedCustomCommandExplicitDependencies.insert(EncodePath(*i)); + this->CombinedCustomCommandExplicitDependencies.insert(*i); } } } -- cgit v0.12