summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-08-27 11:44:56 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-08-27 13:26:37 (GMT)
commit08be47cf939c3adfe653809c46c7b23b7a912a39 (patch)
treeda3855ef19ce4cabfa7261c178b61759b2104b09 /Source
parent564d3a1dc8e19f16db6ddccca38e21d89634c1b4 (diff)
downloadCMake-08be47cf939c3adfe653809c46c7b23b7a912a39.zip
CMake-08be47cf939c3adfe653809c46c7b23b7a912a39.tar.gz
CMake-08be47cf939c3adfe653809c46c7b23b7a912a39.tar.bz2
Convert: Replace UNCHANGED conversions with new API call
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx4
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx18
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx30
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx36
-rw-r--r--Source/cmMakefileTargetGenerator.cxx9
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx5
6 files changed, 43 insertions, 59 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 756db2e..33b0102 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1076,8 +1076,8 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
fout << "file(REMOVE_RECURSE\n";
for (std::vector<std::string>::const_iterator f = files.begin();
f != files.end(); ++f) {
- std::string fc = this->Convert(*f, cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED);
+ std::string fc =
+ this->ConvertToRelativePath(*f, cmOutputConverter::START_OUTPUT);
fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n";
}
fout << ")\n";
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 497defb..1beaa87 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -788,8 +788,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
target->GetProperty("Fortran_MODULE_DIRECTORY");
std::string modDir;
if (target_mod_dir) {
- modDir = this->Convert(target_mod_dir, cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED);
+ modDir = this->ConvertToRelativePath(target_mod_dir,
+ cmOutputConverter::START_OUTPUT);
} else {
modDir = ".";
}
@@ -1300,9 +1300,8 @@ void cmLocalVisualStudio7GeneratorInternals::OutputLibraries(
cmLocalVisualStudio7Generator* lg = this->LocalGenerator;
for (ItemVector::const_iterator l = libs.begin(); l != libs.end(); ++l) {
if (l->IsPath) {
- std::string rel =
- lg->Convert(l->Value.c_str(), cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED);
+ std::string rel = lg->ConvertToRelativePath(
+ l->Value.c_str(), cmOutputConverter::START_OUTPUT);
fout << lg->ConvertToXMLOutputPath(rel.c_str()) << " ";
} else if (!l->Target ||
l->Target->GetType() != cmState::INTERFACE_LIBRARY) {
@@ -1322,8 +1321,8 @@ void cmLocalVisualStudio7GeneratorInternals::OutputObjects(
const char* sep = isep ? isep : "";
for (std::vector<std::string>::const_iterator oi = objs.begin();
oi != objs.end(); ++oi) {
- std::string rel = lg->Convert(oi->c_str(), cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED);
+ std::string rel =
+ lg->ConvertToRelativePath(oi->c_str(), cmOutputConverter::START_OUTPUT);
fout << sep << lg->ConvertToXMLOutputPath(rel.c_str());
sep = " ";
}
@@ -1346,9 +1345,8 @@ void cmLocalVisualStudio7Generator::OutputLibraryDirectories(
// Switch to a relative path specification if it is shorter.
if (cmSystemTools::FileIsFullPath(dir.c_str())) {
- std::string rel =
- this->Convert(dir.c_str(), cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED);
+ std::string rel = this->ConvertToRelativePath(
+ dir.c_str(), cmOutputConverter::START_OUTPUT);
if (rel.size() < dir.size()) {
dir = rel;
}
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index a14df79..66e1ca2 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -218,40 +218,34 @@ 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->Convert(targetFullPath,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ targetFullPath, cmOutputConverter::START_OUTPUT));
#ifdef _WIN32
// There may be a manifest file for this target. Add it to the
// clean set just in case.
- exeCleanFiles.push_back(this->Convert((targetFullPath + ".manifest").c_str(),
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ (targetFullPath + ".manifest").c_str(), cmOutputConverter::START_OUTPUT));
#endif
if (targetNameReal != targetName) {
- exeCleanFiles.push_back(this->Convert(targetFullPathReal,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ targetFullPathReal, cmOutputConverter::START_OUTPUT));
}
if (!targetNameImport.empty()) {
- exeCleanFiles.push_back(this->Convert(targetFullPathImport,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ targetFullPathImport, cmOutputConverter::START_OUTPUT));
std::string implib;
if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport,
implib)) {
- exeCleanFiles.push_back(this->Convert(implib,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ implib, cmOutputConverter::START_OUTPUT));
}
}
// 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->Convert(targetFullPathPDB,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ targetFullPathPDB, cmOutputConverter::START_OUTPUT));
// Add the pre-build and pre-link rules building but not when relinking.
if (!relink) {
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index c8ee05f..c31c469 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -367,46 +367,40 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
// Clean files associated with this library.
std::vector<std::string> libCleanFiles;
- libCleanFiles.push_back(this->Convert(targetFullPath,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ targetFullPath, cmOutputConverter::START_OUTPUT));
if (targetNameReal != targetName) {
- libCleanFiles.push_back(this->Convert(targetFullPathReal,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ targetFullPathReal, cmOutputConverter::START_OUTPUT));
}
if (targetNameSO != targetName && targetNameSO != targetNameReal) {
- libCleanFiles.push_back(this->Convert(targetFullPathSO,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ targetFullPathSO, cmOutputConverter::START_OUTPUT));
}
if (!targetNameImport.empty()) {
- libCleanFiles.push_back(this->Convert(targetFullPathImport,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ targetFullPathImport, cmOutputConverter::START_OUTPUT));
std::string implib;
if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport,
implib)) {
- libCleanFiles.push_back(this->Convert(implib,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ implib, cmOutputConverter::START_OUTPUT));
}
}
// 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->Convert(targetFullPathPDB,
- cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ targetFullPathPDB, cmOutputConverter::START_OUTPUT));
#ifdef _WIN32
// There may be a manifest file for this target. Add it to the
// clean set just in case.
if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) {
- libCleanFiles.push_back(this->Convert(
- (targetFullPath + ".manifest").c_str(), cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED));
+ libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ (targetFullPath + ".manifest").c_str(),
+ cmOutputConverter::START_OUTPUT));
}
#endif
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index dd4333d..2d53669 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -172,8 +172,8 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
const std::vector<std::string>& outputs = ccg.GetOutputs();
for (std::vector<std::string>::const_iterator o = outputs.begin();
o != outputs.end(); ++o) {
- this->CleanFiles.push_back(this->Convert(
- *o, cmOutputConverter::START_OUTPUT, cmOutputConverter::UNCHANGED));
+ this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath(
+ *o, cmOutputConverter::START_OUTPUT));
}
}
}
@@ -1258,9 +1258,8 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule(
this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget);
std::string buildTargetRuleName = dir;
buildTargetRuleName += relink ? "/preinstall" : "/build";
- buildTargetRuleName =
- this->Convert(buildTargetRuleName, cmOutputConverter::HOME_OUTPUT,
- cmOutputConverter::UNCHANGED);
+ buildTargetRuleName = this->LocalGenerator->ConvertToRelativePath(
+ buildTargetRuleName, cmOutputConverter::HOME_OUTPUT);
// Build the list of target outputs to drive.
std::vector<std::string> depends;
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 1b1d04b..216de03 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2416,9 +2416,8 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
ItemVector libs = cli.GetItems();
for (ItemVector::const_iterator l = libs.begin(); l != libs.end(); ++l) {
if (l->IsPath) {
- std::string path = this->LocalGenerator->Convert(
- l->Value.c_str(), cmOutputConverter::START_OUTPUT,
- cmOutputConverter::UNCHANGED);
+ std::string path = this->LocalGenerator->ConvertToRelativePath(
+ l->Value.c_str(), cmOutputConverter::START_OUTPUT);
this->ConvertToWindowsSlash(path);
libVec.push_back(path);
} else if (!l->Target ||