diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index c225f4308..8c3c99731 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -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::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; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 6a1f9413a..259d8a375 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -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()); } } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a76fc2a04..b8267d694 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -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) diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 036b3d29a..c1177d8b1 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -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 diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index ae19cc78c..f463717d7 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -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 = diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index f92bbb088..649c6e02c 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -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 =