Makefiles: Replace ternaries with if()s
This commit is contained in:
parent
51f7dcb0a5
commit
ee49f006cf
|
@ -486,12 +486,13 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher(
|
||||||
std::string output;
|
std::string output;
|
||||||
const std::vector<std::string>& outputs = ccg.GetOutputs();
|
const std::vector<std::string>& outputs = ccg.GetOutputs();
|
||||||
if (!outputs.empty()) {
|
if (!outputs.empty()) {
|
||||||
cmOutputConverter::RelativeRoot relative_root =
|
if (ccg.GetWorkingDirectory().empty()) {
|
||||||
ccg.GetWorkingDirectory().empty() ? cmOutputConverter::START_OUTPUT
|
output = this->Convert(outputs[0], cmOutputConverter::START_OUTPUT,
|
||||||
: cmOutputConverter::NONE;
|
cmOutputConverter::SHELL);
|
||||||
|
} else {
|
||||||
output =
|
output = this->Convert(outputs[0], cmOutputConverter::NONE,
|
||||||
this->Convert(outputs[0], relative_root, cmOutputConverter::SHELL);
|
cmOutputConverter::SHELL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
vars.Output = output.c_str();
|
vars.Output = output.c_str();
|
||||||
|
|
||||||
|
|
|
@ -990,10 +990,14 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
||||||
std::string output;
|
std::string output;
|
||||||
const std::vector<std::string>& outputs = ccg.GetOutputs();
|
const std::vector<std::string>& outputs = ccg.GetOutputs();
|
||||||
if (!outputs.empty()) {
|
if (!outputs.empty()) {
|
||||||
output = this->Convert(outputs[0], workingDir.empty()
|
if (workingDir.empty()) {
|
||||||
? cmOutputConverter::START_OUTPUT
|
output = this->Convert(outputs[0], cmOutputConverter::START_OUTPUT,
|
||||||
: cmOutputConverter::NONE,
|
cmOutputConverter::SHELL);
|
||||||
cmOutputConverter::SHELL);
|
|
||||||
|
} else {
|
||||||
|
output = this->Convert(outputs[0], cmOutputConverter::NONE,
|
||||||
|
cmOutputConverter::SHELL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
vars.Output = output.c_str();
|
vars.Output = output.c_str();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue