diff options
author | Peter Kümmel <syntheticpp@gmx.net> | 2012-10-03 14:14:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-10-09 12:30:03 (GMT) |
commit | 74fc5983b953032f343b47f04a9e8a52e714f4b2 (patch) | |
tree | 29fbd2eb4b07b92ecb40c5ef4c99b2f961bcd17e /Source/cmNinjaTargetGenerator.cxx | |
parent | 17d4527032c4a7e626bbbdb0d4d88bd133c78977 (diff) | |
download | CMake-74fc5983b953032f343b47f04a9e8a52e714f4b2.zip CMake-74fc5983b953032f343b47f04a9e8a52e714f4b2.tar.gz CMake-74fc5983b953032f343b47f04a9e8a52e714f4b2.tar.bz2 |
Ninja: don't pollute current dir when using gui (#13495)
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 612e047..8f8ec41 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -662,9 +662,19 @@ cmNinjaTargetGenerator void 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 |