diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-04 20:56:31 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-06 18:02:08 (GMT) |
commit | 1ed5f6b39b80ab337551f1fa9601b3257ddd4be7 (patch) | |
tree | 1af60419ab2297157ab5b06ae85de09b9fcb74c5 /Source/cmMakefileExecutableTargetGenerator.cxx | |
parent | 8377d9e00b7a00f1687b947aaf3c9e10b6779df4 (diff) | |
download | CMake-1ed5f6b39b80ab337551f1fa9601b3257ddd4be7.zip CMake-1ed5f6b39b80ab337551f1fa9601b3257ddd4be7.tar.gz CMake-1ed5f6b39b80ab337551f1fa9601b3257ddd4be7.tar.bz2 |
Makefiles: Introduce local RelativePath method
This makes it easier to remove directory-specific state from
cmOutputConverter where it doesn't belong. Of course, this just
relocates the problem to the makefiles generator for now, but that's
better than affecting the core.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index cb20117..ff97696 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -130,16 +130,16 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) targetFullPathPDB, cmOutputConverter::SHELL); // Convert to the output path to use in constructing commands. std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), cmOutputConverter::SHELL); std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); std::string targetOutPathImport = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport), cmOutputConverter::SHELL); @@ -215,27 +215,27 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Construct a list of files associated with this executable that // may need to be cleaned. std::vector<std::string> exeCleanFiles; - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); #endif if (targetNameReal != targetName) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal)); } if (!targetNameImport.empty()) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), implib)); } } @@ -243,7 +243,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // List the PDB for cleaning only when the whole target is // cleaned. We do not want to delete the .pdb file just before // linking the target. - this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + this->CleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathPDB)); // Add the pre-build and pre-link rules building but not when relinking. @@ -318,7 +318,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); @@ -326,7 +326,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; std::string target = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), output); vars.Target = target.c_str(); |