Ninja: don't pollute current dir when using gui (#13495)

This commit is contained in:
Peter Kümmel 2012-10-03 16:14:45 +02:00 committed by Brad King
parent 17d4527032
commit 74fc5983b9
1 changed files with 12 additions and 2 deletions

View File

@ -662,9 +662,19 @@ cmNinjaTargetGenerator
void void
cmNinjaTargetGenerator cmNinjaTargetGenerator
::EnsureDirectoryExists(const std::string& dir) const ::EnsureDirectoryExists(const std::string& path) const
{ {
cmSystemTools::MakeDirectory(dir.c_str()); if (cmSystemTools::FileIsFullPath(path.c_str()))
{
cmSystemTools::MakeDirectory(path.c_str());
}
else
{
const std::string fullPath = std::string(this->GetGlobalGenerator()->
GetCMakeInstance()->GetHomeOutputDirectory())
+ "/" + path;
cmSystemTools::MakeDirectory(fullPath.c_str());
}
} }
void void