mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 13:50:10 -05:00
Merge topic 'cleanup-Convert'
4332131dConvert: Make variables a bit more clear5aca066cConvert: Remove UNCHANGED enum value146bf926Convert: Remove 'FULL' conversion58ba87f8Convert: Replace Convert(FULL) with equivalente80314d7Ninja: Replace ternary with if()563ac22aConvert: Replace trivial conversion with new method08be47cfConvert: Replace UNCHANGED conversions with new API call564d3a1dConvert: Extract ConvertToRelativePath from Convert()95a659f1Convert: Replace FULL conversions with equivalenta8c7ccb1VS: Replace FULL/UNCHANGED conversion with equivalent5ad25ef4Convert: Remove NONE conversionac463841Convert: Replace uses of Convert(NONE)998d9ee9VS: Replace variable with an if()ee49f006Makefiles: Replace ternaries with if()s51f7dcb0Makefiles: Inline MakeLauncher into only callerba4ba7c3Makefiles: Simplify MakeLauncher return value ...
This commit is contained in:
@@ -41,7 +41,7 @@ void cmLocalNinjaGenerator::Generate()
|
||||
{
|
||||
// Compute the path to use when referencing the current output
|
||||
// directory from the top output directory.
|
||||
this->HomeRelativeOutputPath = this->Convert(
|
||||
this->HomeRelativeOutputPath = this->ConvertToRelativePath(
|
||||
this->GetCurrentBinaryDirectory(), cmOutputConverter::HOME_OUTPUT);
|
||||
if (this->HomeRelativeOutputPath == ".") {
|
||||
this->HomeRelativeOutputPath = "";
|
||||
@@ -132,9 +132,11 @@ std::string cmLocalNinjaGenerator::ConvertToIncludeReference(
|
||||
std::string const& path, cmOutputConverter::OutputFormat format,
|
||||
bool forceFullPaths)
|
||||
{
|
||||
return this->Convert(path, forceFullPaths ? cmOutputConverter::FULL
|
||||
: cmOutputConverter::HOME_OUTPUT,
|
||||
format);
|
||||
if (forceFullPaths) {
|
||||
return this->ConvertToOutputFormat(cmSystemTools::CollapseFullPath(path),
|
||||
format);
|
||||
}
|
||||
return this->Convert(path, cmOutputConverter::HOME_OUTPUT, format);
|
||||
}
|
||||
|
||||
// Private methods.
|
||||
@@ -487,12 +489,13 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher(
|
||||
std::string output;
|
||||
const std::vector<std::string>& outputs = ccg.GetOutputs();
|
||||
if (!outputs.empty()) {
|
||||
cmOutputConverter::RelativeRoot relative_root =
|
||||
ccg.GetWorkingDirectory().empty() ? cmOutputConverter::START_OUTPUT
|
||||
: cmOutputConverter::NONE;
|
||||
|
||||
output =
|
||||
this->Convert(outputs[0], relative_root, cmOutputConverter::SHELL);
|
||||
if (ccg.GetWorkingDirectory().empty()) {
|
||||
output = this->Convert(outputs[0], cmOutputConverter::START_OUTPUT,
|
||||
cmOutputConverter::SHELL);
|
||||
} else {
|
||||
output =
|
||||
this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL);
|
||||
}
|
||||
}
|
||||
vars.Output = output.c_str();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user