summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorNicolas Despres <nicolas.despres@gmail.com>2016-05-13 23:18:20 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-17 13:34:09 (GMT)
commitac3cdd9af287e653d53b18c432f21a919b102158 (patch)
treec47de8625b62971f1ae5fe3485aff7c4037e3bd2 /Source/cmNinjaTargetGenerator.cxx
parentd4381cb15df3e81b78b6d8d9e7d9b727a616985d (diff)
downloadCMake-ac3cdd9af287e653d53b18c432f21a919b102158.zip
CMake-ac3cdd9af287e653d53b18c432f21a919b102158.tar.gz
CMake-ac3cdd9af287e653d53b18c432f21a919b102158.tar.bz2
Ninja: Convert object file names to ninja paths earlier
In WriteObjectBuildStatement we pass object file names and directories to several places that expect paths as Ninja sees them. Convert them to Ninja paths before all such uses.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index c214c8a..994daea 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -521,8 +521,10 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
std::string const language = source->GetLanguage();
std::string const sourceFileName =
language == "RC" ? source->GetFullPath() : this->GetSourceFilePath(source);
- std::string const objectDir = this->GeneratorTarget->GetSupportDirectory();
- std::string const objectFileName = this->GetObjectFilePath(source);
+ std::string const objectDir =
+ this->ConvertToNinjaPath(this->GeneratorTarget->GetSupportDirectory());
+ std::string const objectFileName =
+ this->ConvertToNinjaPath(this->GetObjectFilePath(source));
std::string const objectFileDir =
cmSystemTools::GetFilenamePath(objectFileName);
@@ -582,9 +584,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
EnsureParentDirectoryExists(objectFileName);
vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
- ConvertToNinjaPath(objectDir), cmLocalGenerator::SHELL);
+ objectDir, cmLocalGenerator::SHELL);
vars["OBJECT_FILE_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
- ConvertToNinjaPath(objectFileDir), cmLocalGenerator::SHELL);
+ objectFileDir, cmLocalGenerator::SHELL);
this->addPoolNinjaVariable("JOB_POOL_COMPILE", this->GetGeneratorTarget(),
vars);