ENH: Converted some ConvertToRelativeOutputPath calls to ConvertToOptionallyRelativeOutputPath in preparation for making ConvertToRelativeOutputPath not check CMAKE_USE_RELATIVE_PATHS.

This commit is contained in:
Brad King 2005-02-24 16:25:47 -05:00
parent ea5f13fc82
commit ea258e9a1a

View File

@ -420,7 +420,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname,
cmTarget& ) cmTarget& )
{ {
std::string objectFile = this->ConvertToRelativeOutputPath(ofname); std::string objectFile = this->ConvertToRelativeOutputPath(ofname);
std::string sourceFile = this->ConvertToRelativeOutputPath(source.GetFullPath().c_str()); std::string sourceFile = this->ConvertToOptionallyRelativeOutputPath(source.GetFullPath().c_str());
std::string varString = "CMAKE_"; std::string varString = "CMAKE_";
varString += lang; varString += lang;
varString += "_COMPILE_OBJECT"; varString += "_COMPILE_OBJECT";
@ -746,7 +746,7 @@ cmLocalGenerator::ExpandRuleVariables(std::string& s,
std::string std::string
cmLocalGenerator::ConvertToOutputForExisting(const char* p) cmLocalGenerator::ConvertToOutputForExisting(const char* p)
{ {
std::string ret = this->ConvertToRelativeOutputPath(p); std::string ret = this->ConvertToOptionallyRelativeOutputPath(p);
// if there are spaces in the path, then get the short path version // if there are spaces in the path, then get the short path version
// if there is one // if there is one
if(ret.find(' ') != std::string::npos) if(ret.find(' ') != std::string::npos)
@ -755,7 +755,7 @@ cmLocalGenerator::ConvertToOutputForExisting(const char* p)
{ {
if(!cmSystemTools::GetShortPath(ret.c_str(), ret)) if(!cmSystemTools::GetShortPath(ret.c_str(), ret))
{ {
ret = this->ConvertToRelativeOutputPath(p); ret = this->ConvertToOptionallyRelativeOutputPath(p);
} }
} }
} }