ENH: removed old convert calls

This commit is contained in:
Ken Martin 2005-06-10 08:41:47 -04:00
parent 8b88391daa
commit 708828dc37
6 changed files with 18 additions and 55 deletions

View File

@ -290,12 +290,14 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
cmakefileStream
<< "# The top level Makefile was generated from the following files:\n"
<< "SET(CMAKE_MAKEFILE_DEPENDS\n"
<< " \"" << lg->ConvertToRelativePath(cache.c_str()).c_str() << "\"\n";
<< " \"" << lg->Convert(cache.c_str(),
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
for(std::vector<std::string>::const_iterator i = lfiles.begin();
i != lfiles.end(); ++i)
{
cmakefileStream
<< " \"" << lg->ConvertToRelativePath(i->c_str()).c_str()
<< " \"" << lg->Convert(i->c_str(),
cmLocalGenerator::START_OUTPUT).c_str()
<< "\"\n";
}
cmakefileStream
@ -309,8 +311,10 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
cmakefileStream
<< "# The corresponding makefile is:\n"
<< "SET(CMAKE_MAKEFILE_OUTPUTS\n"
<< " \"" << lg->ConvertToRelativePath(makefileName.c_str()).c_str() << "\"\n"
<< " \"" << lg->ConvertToRelativePath(check.c_str()).c_str() << "\"\n";
<< " \"" << lg->Convert(makefileName.c_str(),
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"
<< " \"" << lg->Convert(check.c_str(),
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
// add in all the directory information files
std::string tmpStr;

View File

@ -1634,7 +1634,8 @@ std::string cmGlobalXCodeGenerator::ConvertToRelativeForMake(const char* p)
}
else
{
std::string ret = this->ConvertToRelativePath(m_CurrentOutputDirectoryComponents, p);
std::string ret =
this->ConvertToRelativePath(m_CurrentOutputDirectoryComponents, p);
return cmSystemTools::ConvertToOutputPath(ret.c_str());
}
}
@ -1648,7 +1649,8 @@ std::string cmGlobalXCodeGenerator::ConvertToRelativeForXCode(const char* p)
}
else
{
std::string ret = this->ConvertToRelativePath(m_ProjectOutputDirectoryComponents, p);
std::string ret =
this->ConvertToRelativePath(m_ProjectOutputDirectoryComponents, p);
return cmSystemTools::ConvertToOutputPath(ret.c_str());
}
}

View File

@ -481,7 +481,6 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname,
cmSourceFile& source,
cmTarget& )
{
// std::string objectFile = this->ConvertToRelativeOutputPath(ofname);
std::string objectFile = this->Convert(ofname,START_OUTPUT,SHELL);
std::string sourceFile =
this->Convert(source.GetFullPath().c_str(),START_OUTPUT,SHELL,true);
@ -1439,29 +1438,6 @@ cmLocalGenerator::ConstructScript(const cmCustomCommandLines& commandLines,
return script;
}
//----------------------------------------------------------------------------
std::string cmLocalGenerator::ConvertToRelativePath(const char* remote)
{
return this->Convert(remote,START_OUTPUT);
}
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConvertToRelativeOutputPath(const char* remote)
{
// TODO: Make this behave like its documentation...always convert.
// This involves identifying all calls to it that should be calls to
// the optional one.
return this->ConvertToOptionallyRelativeOutputPath(remote);
}
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConvertToOptionallyRelativePath(const char* remote)
{
return this->Convert(remote, START_OUTPUT, UNCHANGED, true);
}
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConvertToOptionallyRelativeOutputPath(const char* remote)

View File

@ -97,27 +97,6 @@ public:
OutputFormat output = UNCHANGED,
bool optional = false);
/**
* Convert the given remote path to a relative path with respect to
* this generator's output directory. The remote path must use
* forward slashes and not already be escaped or quoted.
*/
std::string ConvertToRelativePath(const char* remote);
/**
* Convert to an output path that is relative to the current output
* directory. The remote path must use forward slashes and not
* already be escaped or quoted.
*/
std::string ConvertToRelativeOutputPath(const char* remote);
/**
* Calls ConvertToRelativePath conditionally on the cache option
* CMAKE_USE_RELATIVE_PATHS. The remote path must use forward
* slashes and not already be escaped or quoted.
*/
std::string ConvertToOptionallyRelativePath(const char* remote);
/**
* Convert the given path to an output path that is optionally
* relative based on the cache option CMAKE_USE_RELATIVE_PATHS. The

View File

@ -172,11 +172,12 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule()
std::string args;
args = "-H";
args +=
this->ConvertToRelativeOutputPath(m_Makefile->GetHomeDirectory());
this->Convert(m_Makefile->GetHomeDirectory(),START_OUTPUT, SHELL, true);
commandLine.push_back(args);
args = "-B";
args +=
this->ConvertToRelativeOutputPath(m_Makefile->GetHomeOutputDirectory());
this->Convert(m_Makefile->GetHomeOutputDirectory(),
START_OUTPUT, SHELL, true);
commandLine.push_back(args);
std::string configFile =

View File

@ -147,11 +147,12 @@ void cmLocalVisualStudio7Generator::AddVCProjBuildRule()
std::string args;
args = "-H";
args +=
this->ConvertToRelativeOutputPath(m_Makefile->GetHomeDirectory());
this->Convert(m_Makefile->GetHomeDirectory(), START_OUTPUT, SHELL, true);
commandLine.push_back(args);
args = "-B";
args +=
this->ConvertToRelativeOutputPath(m_Makefile->GetHomeOutputDirectory());
this->Convert(m_Makefile->GetHomeOutputDirectory(),
START_OUTPUT, SHELL, true);
commandLine.push_back(args);
std::string configFile =