diff options
author | Brad King <brad.king@kitware.com> | 2005-02-25 00:32:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-02-25 00:32:50 (GMT) |
commit | c56045f2e27557b2c18500e8bb82e0c2ae1405d3 (patch) | |
tree | 7fc58ace33139418958769ed6bd3f32fd912287b /Source/cmLocalUnixMakefileGenerator.cxx | |
parent | de47b43c6f2f40e62620c49a3b34960f3cb8d90c (diff) | |
download | CMake-c56045f2e27557b2c18500e8bb82e0c2ae1405d3.zip CMake-c56045f2e27557b2c18500e8bb82e0c2ae1405d3.tar.gz CMake-c56045f2e27557b2c18500e8bb82e0c2ae1405d3.tar.bz2 |
BUG: Removed instances of calling ConvertToRelativeOutputPath twice on the same path.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 9a881cc..e18d73a 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -887,7 +887,7 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout, this->OutputMakeRule(fout, comment, name, - this->ConvertToRelativeOutputPath(tgt.c_str()).c_str(), + tgt.c_str(), 0); } @@ -1040,17 +1040,15 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout, #endif target += name; target += cmSystemTools::GetExecutableExtension(); - target = this->ConvertToRelativeOutputPath(target.c_str()); bool needsLocalTarget = false; if(m_UseRelativePaths) { - cmSystemTools::ConvertToUnixSlashes(target); - std::string tgt = this->ConvertToMakeTarget(target.c_str()); + std::string tgt = + this->ConvertToMakeTarget(this->ConvertToRelativeOutputPath(target.c_str()).c_str()); if(tgt.find('/', 0) != tgt.npos) { needsLocalTarget = true; } - target = cmSystemTools::ConvertToOutputPath(target.c_str()); } else { @@ -1146,7 +1144,7 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout, this->ExpandRuleVariables(*i, linkLanguage, objs.c_str(), - target.c_str(), + this->ConvertToRelativeOutputPath(target.c_str()).c_str(), linklibs.str().c_str(), 0, 0, @@ -1167,10 +1165,9 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout, // try-compile to work in this case. if(needsLocalTarget) { - depend = target; + depend = this->ConvertToRelativeOutputPath(target.c_str()); target = name; target += cmSystemTools::GetExecutableExtension(); - target = this->ConvertToRelativeOutputPath(target.c_str()); commands.resize(0); this->OutputMakeRule(fout, comment.c_str(), @@ -1184,7 +1181,8 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout, // correctly. Do not duplicate this target. if(target != name) { - this->OutputMakeRule(fout, comment.c_str(), name, target.c_str(), 0); + this->OutputMakeRule(fout, comment.c_str(), name, + this->ConvertToRelativeOutputPath(target.c_str()).c_str(), 0); } } @@ -2172,7 +2170,6 @@ void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout) std::string checkCache = m_Makefile->GetHomeOutputDirectory(); checkCache += "/cmake.check_cache"; - checkCache = this->ConvertToRelativeOutputPath(checkCache.c_str()); std::vector<std::string> cmake_depends; cmake_depends.push_back("$(CMAKE_MAKEFILE_SOURCES)"); @@ -2247,7 +2244,6 @@ void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout) } std::string cacheFile = m_Makefile->GetHomeOutputDirectory(); cacheFile += "/CMakeCache.txt"; - cacheFile = this->ConvertToRelativeOutputPath(cacheFile.c_str()); this->OutputMakeRule(fout, "CMakeCache.txt", cacheFile.c_str(), |