mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 19:19:32 -05:00
Merge topic 'cleanup-Convert'
20e62f74cmLocalGenerator: Simplify ConvertToLinkReferencefd93b360cmOutputConverter: Add a flag for IsUnix1365e18bConvert: Inline platform-specific methods1ed5f6b3Makefiles: Introduce local RelativePath method8377d9e0Fortran: Inline conversion to relative path00173b71Fortran: Wrap path convert in a call with a more-suitable named5911ef0Makefiles: Hardcode the relative location of the CMakeCache filec3264f48Convert: Extract method to determine if paths are in directory52168f32Convert: Remove asserts which are duplicated in delegate method5213f893Convert: Remove early return checkb61c268bConvert: Extract local variables for readabilitye278f5a8Convert: Extract local variables51bc6bddcmOutputConverter: remove unused code8e0c1599Xcode: Inline ConvertToRelativePath calls
This commit is contained in:
@@ -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);
|
||||
@@ -220,27 +220,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));
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,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.
|
||||
@@ -323,7 +323,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();
|
||||
@@ -331,7 +331,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();
|
||||
|
||||
Reference in New Issue
Block a user