diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-12-22 16:50:24 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-12-22 16:50:24 (GMT) |
commit | d14ceb8a381b470b51eb5a1033dd8296156cd01f (patch) | |
tree | 6f3f9f42f95da3db8faac6202e88da4616e9b338 /Source | |
parent | 03bfa86394976eb88b27b0f7b7f5a315dbbc8a4d (diff) | |
download | CMake-d14ceb8a381b470b51eb5a1033dd8296156cd01f.zip CMake-d14ceb8a381b470b51eb5a1033dd8296156cd01f.tar.gz CMake-d14ceb8a381b470b51eb5a1033dd8296156cd01f.tar.bz2 |
clean up warning and use more short paths
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 41778cb..9e57a15 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -832,8 +832,6 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout, // collect up the link libraries cmOStringStream linklibs; this->OutputLinkLibraries(linklibs, name, t); - const char* targetLinkFlags = t.GetProperty("LINK_FLAGS"); - std::string allLinkFlags; for(std::vector<std::string>::iterator i = commands.begin(); i != commands.end(); ++i) { @@ -1332,8 +1330,8 @@ void cmLocalUnixMakefileGenerator::OutputBuildTargetInDirWindows(std::ostream& f const char* makeTarget = library; std::string currentDir = cmSystemTools::ConvertToOutputPath(m_Makefile->GetCurrentOutputDirectory()); - std::string wpath = cmSystemTools::ConvertToOutputPath(path); - std::string wfullpath = cmSystemTools::ConvertToOutputPath(fullpath); + std::string wpath = this->ConvertToOutputForExisting(path); + std::string wfullpath = this->ConvertToOutputForExisting(fullpath); if(libOutPath && strcmp( libOutPath, "" ) != 0) { makeTarget = wfullpath.c_str(); @@ -1363,8 +1361,8 @@ void cmLocalUnixMakefileGenerator::OutputBuildTargetInDir(std::ostream& fout, { makeTarget = fullpath; } - fout << cmSystemTools::ConvertToOutputPath(fullpath) - << ":\n\tcd " << cmSystemTools::ConvertToOutputPath(path) + fout << this->ConvertToOutputForExisting(fullpath) + << ":\n\tcd " << this->ConvertToOutputForExisting(path) << "; $(MAKE) $(MAKESILENT) cmake.depends" << "; $(MAKE) $(MAKESILENT) cmake.check_depends" << "; $(MAKE) $(MAKESILENT) -f cmake.check_depends" @@ -1515,7 +1513,7 @@ void cmLocalUnixMakefileGenerator::BuildInSubDirectoryWindows(std::ostream& fout { if(target1) { - std::string dir = cmSystemTools::ConvertToOutputPath(directory); + std::string dir = this->ConvertToOutputForExisting(directory); if(dir[0] == '\"') { dir = dir.substr(1, dir.size()-2); @@ -1539,7 +1537,7 @@ void cmLocalUnixMakefileGenerator::BuildInSubDirectoryWindows(std::ostream& fout fout << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) " << target2 << "\n"; } std::string currentDir = m_Makefile->GetCurrentOutputDirectory(); - fout << "\tcd " << cmSystemTools::ConvertToOutputPath(currentDir.c_str()) << "\n\n"; + fout << "\tcd " << this->ConvertToOutputForExisting(currentDir.c_str()) << "\n\n"; } @@ -1919,9 +1917,12 @@ cmLocalUnixMakefileGenerator::ConvertToOutputForExisting(const char* p) // if there is one if(ret.find(' ') != std::string::npos) { - if(!cmSystemTools::GetShortPath(ret.c_str(), ret)) + if(cmSystemTools::FileExists(p)) { - ret = p; + if(!cmSystemTools::GetShortPath(ret.c_str(), ret)) + { + ret = p; + } } } return ret; |