cmGlobalNinjaGenerator: Add helper to compute absolute paths for build.ninja
This commit is contained in:
parent
efb8d7b4a1
commit
18408c0b88
@ -1160,6 +1160,15 @@ std::string const& cmGlobalNinjaGenerator::ConvertToNinjaPath(
|
||||
.first->second;
|
||||
}
|
||||
|
||||
std::string cmGlobalNinjaGenerator::ConvertToNinjaAbsPath(
|
||||
std::string path) const
|
||||
{
|
||||
#ifdef _WIN32
|
||||
std::replace(path.begin(), path.end(), '/', '\\');
|
||||
#endif
|
||||
return path;
|
||||
}
|
||||
|
||||
void cmGlobalNinjaGenerator::AddAdditionalCleanFile(std::string fileName,
|
||||
const std::string& config)
|
||||
{
|
||||
|
@ -261,6 +261,7 @@ public:
|
||||
}
|
||||
|
||||
std::string const& ConvertToNinjaPath(const std::string& path) const;
|
||||
std::string ConvertToNinjaAbsPath(std::string path) const;
|
||||
|
||||
struct MapToNinjaPathImpl
|
||||
{
|
||||
|
@ -110,6 +110,11 @@ protected:
|
||||
return this->GetGlobalGenerator()->MapToNinjaPath();
|
||||
}
|
||||
|
||||
std::string ConvertToNinjaAbsPath(std::string path) const
|
||||
{
|
||||
return this->GetGlobalGenerator()->ConvertToNinjaAbsPath(std::move(path));
|
||||
}
|
||||
|
||||
/// @return the list of link dependency for the given target @a target.
|
||||
cmNinjaDeps ComputeLinkDeps(const std::string& linkLanguage,
|
||||
const std::string& config,
|
||||
|
Loading…
Reference in New Issue
Block a user