summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-31 13:32:32 -0400
committerBrad King <brad.king@kitware.com>2017-05-31 13:44:16 -0400
commit82badfffc34f043521ff3314047a3831e0fb17c7 (patch)
tree2d8615111cd938a67997f0455f7f53758bb8b993
parentc5ff50fc19ac8393be3cad5f7c1578a6a8c64819 (diff)
downloadcmake-82badfffc34f043521ff3314047a3831e0fb17c7.tar.gz
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.
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 39f5d8f78c..bb0b83a3f6 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);
}
}
}