diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 635de490acce1998020ed637d7ec7f491a4b3ddf..cfb5efd0ea3f65e785d88efe21139ff83520f683 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -195,7 +195,7 @@ bool DebGenerator::generateDataTar() const // XXX/application/usr/bin/myprogram with GEN_WDIR=XXX/application // should not add XXX/application orderedFiles.insert(currentPath); - currentPath = cmSystemTools::CollapseCombinedPath(currentPath, ".."); + currentPath = cmSystemTools::CollapseFullPath("..", currentPath); } } diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx index fcf8af1f8d2da98d20ea5d10a2acf5ca9666f3cc..dd8127d897a546811c602b060003fda77482293d 100644 --- a/Source/CPack/cmCPackFreeBSDGenerator.cxx +++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx @@ -325,8 +325,7 @@ int cmCPackFreeBSDGenerator::PackageFiles() ONE_PACKAGE_PER_COMPONENT); } - std::string output_dir = - cmSystemTools::CollapseCombinedPath(toplevel, "../"); + std::string output_dir = cmSystemTools::CollapseFullPath("../", toplevel); pkg_create_from_manifest(output_dir.c_str(), ::TXZ, toplevel.c_str(), manifestname.c_str(), nullptr); diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 58b4ebb16abe987519bfdbe3151650e005da7f71..7b78767f2861dc2f4f9d5cbf773bf2145a0ac7ae 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -150,7 +150,7 @@ bool cmDependsC::WriteDependencies(const std::set& sources, // Construct the name of the file as if it were in the current // include directory. Avoid using a leading "./". std::string tmpPath = - cmSystemTools::CollapseCombinedPath(iPath, current.FileName); + cmSystemTools::CollapseFullPath(current.FileName, iPath); // Look for the file in this location. if (cmSystemTools::FileExists(tmpPath, true)) { @@ -362,7 +362,7 @@ void cmDependsC::Scan(std::istream& is, const std::string& directory, // must check for the file in the directory containing the // file we are scanning. entry.QuotedLocation = - cmSystemTools::CollapseCombinedPath(directory, entry.FileName); + cmSystemTools::CollapseFullPath(entry.FileName, directory); } // Queue the file if it has not yet been encountered and it diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 9f8f12b96df4cc6b073e0b11ad6aab5d54a3c693..c73ec700e9047433ed3cff4f6057d2d1f0ae7d0c 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -287,7 +287,7 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLine(std::ostream& fout, if (l.compare(0, 2, "-l") == 0) { fout << " \"" << l << "\"" << std::endl; } else { - std::string rl = cmSystemTools::CollapseCombinedPath(cbd, l); + std::string rl = cmSystemTools::CollapseFullPath(l, cbd); fout << " -l\"" << rl << "\"" << std::endl; } } diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 4f1d06a232fe4a57fc015389bb9a010667f8db50..dba9afa23d5efe767cbafba76464c9f4e69d43dd 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -185,8 +185,7 @@ void cmGlobalGhsMultiGenerator::GetToolset(cmMakefile* mf, std::string& tsd, } } else { std::string tryPath; - /* CollapseCombinedPath will check if ts is an absolute path */ - tryPath = cmSystemTools::CollapseCombinedPath(tsd, ts); + tryPath = cmSystemTools::CollapseFullPath(ts, tsd); if (!cmSystemTools::FileExists(tryPath)) { std::string msg = "GHS toolset \"" + tryPath + "\" not found."; cmSystemTools::Error(msg); diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx index 022947f66268ea8031bcac5c7bdafaf864fd238a..87ef112d4e35120882d2260a7665b752f34d8e58 100644 --- a/Source/cmQtAutoGen.cxx +++ b/Source/cmQtAutoGen.cxx @@ -309,7 +309,7 @@ void cmQtAutoGen::RccListConvertFullPath(std::string const& qrcFileDir, std::vector& files) { for (std::string& entry : files) { - std::string tmp = cmSystemTools::CollapseCombinedPath(qrcFileDir, entry); + std::string tmp = cmSystemTools::CollapseFullPath(entry, qrcFileDir); entry = std::move(tmp); } } diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx index af50c1dd46423f5e5c625dc05db9f9925ad8cae8..a1abd3f57281cd58ac55e2b0ed3803e15639668d 100644 --- a/Source/cmQtAutoGenerator.cxx +++ b/Source/cmQtAutoGenerator.cxx @@ -158,11 +158,11 @@ std::string cmQtAutoGenerator::FileSystem::GetRealPath( return cmSystemTools::GetRealPath(filename); } -std::string cmQtAutoGenerator::FileSystem::CollapseCombinedPath( - std::string const& dir, std::string const& file) +std::string cmQtAutoGenerator::FileSystem::CollapseFullPath( + std::string const& file, std::string const& dir) { std::lock_guard lock(Mutex_); - return cmSystemTools::CollapseCombinedPath(dir, file); + return cmSystemTools::CollapseFullPath(file, dir); } void cmQtAutoGenerator::FileSystem::SplitPath( diff --git a/Source/cmQtAutoGenerator.h b/Source/cmQtAutoGenerator.h index 6771dd86924cd54a82650476e8b5771338cd09fe..b55bebc286a137e731d2b4bd221ec2a4a053ebfa 100644 --- a/Source/cmQtAutoGenerator.h +++ b/Source/cmQtAutoGenerator.h @@ -77,9 +77,9 @@ public: // -- Paths /// @brief Wrapper for cmSystemTools::GetRealPath std::string GetRealPath(std::string const& filename); - /// @brief Wrapper for cmSystemTools::CollapseCombinedPath - std::string CollapseCombinedPath(std::string const& dir, - std::string const& file); + /// @brief Wrapper for cmSystemTools::CollapseFullPath + std::string CollapseFullPath(std::string const& file, + std::string const& dir); /// @brief Wrapper for cmSystemTools::SplitPath void SplitPath(const std::string& p, std::vector& components, bool expand_home_dir = true); diff --git a/Source/cmQtAutoGeneratorMocUic.cxx b/Source/cmQtAutoGeneratorMocUic.cxx index b02cd44ccad21a7e3d5016451ea2ed2aa8cf0257..cb6f7eab1e1d3633f438e901dd653a2f2c8e8de4 100644 --- a/Source/cmQtAutoGeneratorMocUic.cxx +++ b/Source/cmQtAutoGeneratorMocUic.cxx @@ -27,7 +27,7 @@ std::string cmQtAutoGeneratorMocUic::BaseSettingsT::AbsoluteBuildPath( std::string const& relativePath) const { - return FileSys->CollapseCombinedPath(AutogenBuildDir, relativePath); + return FileSys->CollapseFullPath(relativePath, AutogenBuildDir); } /**