summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx8
-rw-r--r--Source/cmLocalGenerator.cxx73
-rw-r--r--Source/cmLocalGenerator.h3
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx7
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx7
-rw-r--r--Source/cmMakefileTargetGenerator.cxx5
-rw-r--r--Source/cmMakefileTargetGenerator.h5
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx5
8 files changed, 47 insertions, 66 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index a3ebc61..3102ebc 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -310,14 +310,10 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
cmCustomCommandLine commandLine;
commandLine.push_back(cmSystemTools::GetCMakeCommand());
std::string argH = "-H";
- argH += lg->Convert(mf->GetHomeDirectory(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::UNCHANGED, true);
+ argH += mf->GetHomeDirectory();
commandLine.push_back(argH);
std::string argB = "-B";
- argB += lg->Convert(mf->GetHomeOutputDirectory(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::UNCHANGED, true);
+ argB += mf->GetHomeOutputDirectory();
commandLine.push_back(argB);
commandLine.push_back("--check-stamp-list");
commandLine.push_back(stampList.c_str());
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f35de03..c686ab1 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -517,7 +517,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname,
objectDir = this->Convert(objectDir,START_OUTPUT,SHELL);
std::string objectFile = this->Convert(ofname,START_OUTPUT,SHELL);
std::string sourceFile =
- this->Convert(source.GetFullPath(),START_OUTPUT,SHELL,true);
+ this->ConvertToOutputFormat(source.GetFullPath(), SHELL);
std::string varString = "CMAKE_";
varString += lang;
varString += "_COMPILE_OBJECT";
@@ -1177,7 +1177,7 @@ cmLocalGenerator::ConvertToOutputForExistingCommon(const std::string& remote,
std::string tmp;
if(cmSystemTools::GetShortPath(remote, tmp))
{
- return this->Convert(tmp, NONE, format, true);
+ return this->ConvertToOutputFormat(tmp, format);
}
}
@@ -1191,8 +1191,10 @@ cmLocalGenerator::ConvertToOutputForExisting(const std::string& remote,
RelativeRoot local,
OutputFormat format)
{
+ static_cast<void>(local);
+
// Perform standard conversion.
- std::string result = this->Convert(remote, local, format, true);
+ std::string result = this->ConvertToOutputFormat(remote, format);
// Consider short-path.
return this->ConvertToOutputForExistingCommon(remote, result, format);
@@ -1311,8 +1313,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
{
includeFlags << fwSearchFlag;
}
- includeFlags << this->Convert(frameworkDir, START_OUTPUT,
- shellFormat, true)
+ includeFlags << this->ConvertToOutputFormat(frameworkDir, shellFormat)
<< " ";
}
continue;
@@ -2686,42 +2687,39 @@ const char* cmLocalGenerator::GetRelativeRootPath(RelativeRoot relroot)
//----------------------------------------------------------------------------
std::string cmLocalGenerator::Convert(const std::string& source,
RelativeRoot relative,
- OutputFormat output,
- bool optional)
+ OutputFormat output)
{
// Convert the path to a relative path.
std::string result = source;
- if (!optional)
+ switch (relative)
{
- switch (relative)
- {
- case HOME:
- //result = cmSystemTools::CollapseFullPath(result.c_str());
- result = this->ConvertToRelativePath(
- this->GetState()->GetSourceDirectoryComponents(), result);
- break;
- case START:
- //result = cmSystemTools::CollapseFullPath(result.c_str());
- result = this->ConvertToRelativePath(
- this->StateSnapshot.GetCurrentSourceDirectoryComponents(), result);
- break;
- case HOME_OUTPUT:
- //result = cmSystemTools::CollapseFullPath(result.c_str());
- result = this->ConvertToRelativePath(
- this->GetState()->GetBinaryDirectoryComponents(), result);
- break;
- case START_OUTPUT:
- //result = cmSystemTools::CollapseFullPath(result.c_str());
- result = this->ConvertToRelativePath(
- this->StateSnapshot.GetCurrentBinaryDirectoryComponents(), result);
- break;
- case FULL:
- result = cmSystemTools::CollapseFullPath(result);
- break;
- case NONE:
- break;
- }
+ case HOME:
+ //result = cmSystemTools::CollapseFullPath(result.c_str());
+ result = this->ConvertToRelativePath(
+ this->GetState()->GetSourceDirectoryComponents(), result);
+ break;
+ case START:
+ //result = cmSystemTools::CollapseFullPath(result.c_str());
+ result = this->ConvertToRelativePath(
+ this->StateSnapshot.GetCurrentSourceDirectoryComponents(), result);
+ break;
+ case HOME_OUTPUT:
+ //result = cmSystemTools::CollapseFullPath(result.c_str());
+ result = this->ConvertToRelativePath(
+ this->GetState()->GetBinaryDirectoryComponents(), result);
+ break;
+ case START_OUTPUT:
+ //result = cmSystemTools::CollapseFullPath(result.c_str());
+ result = this->ConvertToRelativePath(
+ this->StateSnapshot.GetCurrentBinaryDirectoryComponents(), result);
+ break;
+ case FULL:
+ result = cmSystemTools::CollapseFullPath(result);
+ break;
+ case NONE:
+ break;
+
}
return this->ConvertToOutputFormat(result, output);
}
@@ -2765,8 +2763,7 @@ std::string cmLocalGenerator::ConvertToOutputFormat(const std::string& source,
//----------------------------------------------------------------------------
std::string cmLocalGenerator::Convert(RelativeRoot remote,
const std::string& local,
- OutputFormat output,
- bool optional)
+ OutputFormat output, bool optional)
{
const char* remotePath = this->GetRelativeRootPath(remote);
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 30b622e..f02b5db 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -115,8 +115,7 @@ public:
std::string ConvertToOutputFormat(const std::string& source,
OutputFormat output);
std::string Convert(const std::string& remote, RelativeRoot local,
- OutputFormat output = UNCHANGED,
- bool optional = false);
+ OutputFormat output = UNCHANGED);
std::string Convert(RelativeRoot remote, const std::string& local,
OutputFormat output = UNCHANGED,
bool optional = false);
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index e5f9f55..a26a1dd 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -235,13 +235,10 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt)
comment += makefileIn;
std::string args;
args = "-H";
- args += this->Convert(this->Makefile->GetHomeDirectory(),
- START_OUTPUT, UNCHANGED, true);
+ args += this->Makefile->GetHomeDirectory();
commandLine.push_back(args);
args = "-B";
- args +=
- this->Convert(this->Makefile->GetHomeOutputDirectory(),
- START_OUTPUT, UNCHANGED, true);
+ args += this->Makefile->GetHomeOutputDirectory();
commandLine.push_back(args);
std::vector<std::string> const& listFiles = this->Makefile->GetListFiles();
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index c565632..717f33f 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -305,13 +305,10 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
comment += makefileIn;
std::string args;
args = "-H";
- args += this->Convert(this->Makefile->GetHomeDirectory(),
- START_OUTPUT, UNCHANGED, true);
+ args += this->Makefile->GetHomeDirectory();
commandLine.push_back(args);
args = "-B";
- args +=
- this->Convert(this->Makefile->GetHomeOutputDirectory(),
- START_OUTPUT, UNCHANGED, true);
+ args += this->Makefile->GetHomeOutputDirectory();
commandLine.push_back(args);
commandLine.push_back("--check-stamp-file");
std::string stampFilename = this->Convert(stampName.c_str(), FULL,
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index d422e28..9ac9ddb 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1589,9 +1589,8 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags(std::string const& l)
if(emitted.insert(*i).second)
{
flags += fwSearchFlag;
- flags += this->Convert(*i,
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::SHELL, true);
+ flags += this->LocalGenerator
+ ->ConvertToOutputFormat(*i, cmLocalGenerator::SHELL);
flags += " ";
}
}
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index 58044e8..2e1b052 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -273,10 +273,9 @@ protected:
std::string Convert(const std::string& source,
cmLocalGenerator::RelativeRoot relative,
cmLocalGenerator::OutputFormat output =
- cmLocalGenerator::UNCHANGED,
- bool optional = false)
+ cmLocalGenerator::UNCHANGED)
{
- return this->LocalGenerator->Convert(source, relative, output, optional);
+ return this->LocalGenerator->Convert(source, relative, output);
}
};
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 5dfdb14..527524e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -923,10 +923,7 @@ cmVisualStudio10TargetGenerator::ConvertPath(std::string const& path,
return forceRelative
? cmSystemTools::RelativePath(
this->Makefile->GetCurrentBinaryDirectory(), path.c_str())
- : this->LocalGenerator->Convert(path.c_str(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::UNCHANGED,
- /* optional = */ true);
+ : path.c_str();
}
void cmVisualStudio10TargetGenerator::ConvertToWindowsSlash(std::string& s)