summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx23
1 files changed, 13 insertions, 10 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 4200e5d..d15ee22 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -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();