mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-27 04:09:36 +03:00
Ninja Multi-Config: Improve error handling when not doing cross-config build
This commit is contained in:
@@ -1192,7 +1192,10 @@ void cmGlobalNinjaGenerator::WriteTargetAliases(std::ostream& os)
|
|||||||
this->AppendTargetOutputs(ta.second.GeneratorTarget, build.ExplicitDeps,
|
this->AppendTargetOutputs(ta.second.GeneratorTarget, build.ExplicitDeps,
|
||||||
ta.second.Config);
|
ta.second.Config);
|
||||||
}
|
}
|
||||||
this->WriteBuild(os, build);
|
this->WriteBuild(this->EnableCrossConfigBuild()
|
||||||
|
? os
|
||||||
|
: *this->GetConfigFileStream(ta.second.Config),
|
||||||
|
build);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->IsMultiConfig()) {
|
if (this->IsMultiConfig()) {
|
||||||
@@ -1259,7 +1262,10 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Write target
|
// Write target
|
||||||
this->WriteBuild(os, build);
|
this->WriteBuild(this->EnableCrossConfigBuild()
|
||||||
|
? os
|
||||||
|
: *this->GetConfigFileStream(config),
|
||||||
|
build);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add shortcut target
|
// Add shortcut target
|
||||||
@@ -1282,7 +1288,7 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os)
|
|||||||
}
|
}
|
||||||
build.Outputs.front() = this->BuildAlias(
|
build.Outputs.front() = this->BuildAlias(
|
||||||
this->ConvertToNinjaPath(currentBinaryDir + "/all"), "all");
|
this->ConvertToNinjaPath(currentBinaryDir + "/all"), "all");
|
||||||
this->WriteBuild(*this->GetCommonFileStream(), build);
|
this->WriteBuild(os, build);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-3
@@ -1,3 +1 @@
|
|||||||
^ninja: error: 'RelWithDebInfo/[^
|
^ninja: error: unknown target 'all:RelWithDebInfo'$
|
||||||
]*simplestatic[^
|
|
||||||
]*', needed by 'all:RelWithDebInfo', missing and no known rule to make it$
|
|
||||||
|
|||||||
+1
-3
@@ -1,3 +1 @@
|
|||||||
^ninja: error: 'RelWithDebInfo/[^
|
^ninja: error: unknown target 'simplestatic:RelWithDebInfo'$
|
||||||
]*simplestatic[^
|
|
||||||
]*', needed by 'simplestatic:RelWithDebInfo', missing and no known rule to make it$
|
|
||||||
|
|||||||
Reference in New Issue
Block a user