mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-09 01:09:30 -05:00
Ninja: Add multi-config variant
Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@ cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter,
|
||||
, OutputConverter(outputConverter)
|
||||
, ForResponse(false)
|
||||
, UseWatcomQuote(false)
|
||||
, UseNinjaMulti(false)
|
||||
, Relink(false)
|
||||
{
|
||||
}
|
||||
@@ -34,6 +35,11 @@ void cmLinkLineComputer::SetUseWatcomQuote(bool useWatcomQuote)
|
||||
this->UseWatcomQuote = useWatcomQuote;
|
||||
}
|
||||
|
||||
void cmLinkLineComputer::SetUseNinjaMulti(bool useNinjaMulti)
|
||||
{
|
||||
this->UseNinjaMulti = useNinjaMulti;
|
||||
}
|
||||
|
||||
void cmLinkLineComputer::SetForResponse(bool forResponse)
|
||||
{
|
||||
this->ForResponse = forResponse;
|
||||
@@ -106,10 +112,14 @@ void cmLinkLineComputer::ComputeLinkLibs(
|
||||
|
||||
std::string cmLinkLineComputer::ConvertToOutputFormat(std::string const& input)
|
||||
{
|
||||
cmOutputConverter::OutputFormat shellFormat = (this->ForResponse)
|
||||
? cmOutputConverter::RESPONSE
|
||||
: ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE
|
||||
: cmOutputConverter::SHELL);
|
||||
cmOutputConverter::OutputFormat shellFormat = cmOutputConverter::SHELL;
|
||||
if (this->ForResponse) {
|
||||
shellFormat = cmOutputConverter::RESPONSE;
|
||||
} else if (this->UseWatcomQuote) {
|
||||
shellFormat = cmOutputConverter::WATCOMQUOTE;
|
||||
} else if (this->UseNinjaMulti) {
|
||||
shellFormat = cmOutputConverter::NINJAMULTI;
|
||||
}
|
||||
|
||||
return this->OutputConverter->ConvertToOutputFormat(input, shellFormat);
|
||||
}
|
||||
@@ -117,10 +127,14 @@ std::string cmLinkLineComputer::ConvertToOutputFormat(std::string const& input)
|
||||
std::string cmLinkLineComputer::ConvertToOutputForExisting(
|
||||
std::string const& input)
|
||||
{
|
||||
cmOutputConverter::OutputFormat shellFormat = (this->ForResponse)
|
||||
? cmOutputConverter::RESPONSE
|
||||
: ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE
|
||||
: cmOutputConverter::SHELL);
|
||||
cmOutputConverter::OutputFormat shellFormat = cmOutputConverter::SHELL;
|
||||
if (this->ForResponse) {
|
||||
shellFormat = cmOutputConverter::RESPONSE;
|
||||
} else if (this->UseWatcomQuote) {
|
||||
shellFormat = cmOutputConverter::WATCOMQUOTE;
|
||||
} else if (this->UseNinjaMulti) {
|
||||
shellFormat = cmOutputConverter::NINJAMULTI;
|
||||
}
|
||||
|
||||
return this->OutputConverter->ConvertToOutputForExisting(input, shellFormat);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user