Commit 82badfff authored by Brad King's avatar Brad King
Browse files

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.
parent c5ff50fc
......@@ -209,7 +209,7 @@ void cmGlobalNinjaGenerator::WriteBuild(
++i) {
build += " " + EncodeIdent(EncodePath(*i), os);
if (this->ComputingUnknownDependencies) {
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) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment