summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-04 17:57:44 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-04 17:58:57 (GMT)
commit02bebd60e9255b6e3eb4bbd6208b4c5cd8f5da40 (patch)
tree67f0e338a4424508826fc61e7e947c35df7eab6d /Source/cmLocalGenerator.cxx
parentc87517099abbef70b9718a3920954e9097f36bbe (diff)
downloadCMake-02bebd60e9255b6e3eb4bbd6208b4c5cd8f5da40.zip
CMake-02bebd60e9255b6e3eb4bbd6208b4c5cd8f5da40.tar.gz
CMake-02bebd60e9255b6e3eb4bbd6208b4c5cd8f5da40.tar.bz2
cmLocalGenerator: Add format option to ConvertToOutputForExisting
Replace the hard-coded SHELL output format with an optional argument.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 4266dd0..87685d5 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1228,7 +1228,8 @@ void cmLocalGenerator::InsertRuleLauncher(std::string& s, cmTarget* target,
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConvertToOutputForExistingCommon(const char* remote,
- std::string const& result)
+ std::string const& result,
+ OutputFormat format)
{
// If this is a windows shell, the result has a space, and the path
// already exists, we can use a short-path to reference it without a
@@ -1239,7 +1240,7 @@ cmLocalGenerator::ConvertToOutputForExistingCommon(const char* remote,
std::string tmp;
if(cmSystemTools::GetShortPath(remote, tmp))
{
- return this->Convert(tmp.c_str(), NONE, SHELL, true);
+ return this->Convert(tmp.c_str(), NONE, format, true);
}
}
@@ -1250,26 +1251,28 @@ cmLocalGenerator::ConvertToOutputForExistingCommon(const char* remote,
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConvertToOutputForExisting(const char* remote,
- RelativeRoot local)
+ RelativeRoot local,
+ OutputFormat format)
{
// Perform standard conversion.
- std::string result = this->Convert(remote, local, SHELL, true);
+ std::string result = this->Convert(remote, local, format, true);
// Consider short-path.
- return this->ConvertToOutputForExistingCommon(remote, result);
+ return this->ConvertToOutputForExistingCommon(remote, result, format);
}
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote,
- const char* local)
+ const char* local,
+ OutputFormat format)
{
// Perform standard conversion.
- std::string result = this->Convert(remote, local, SHELL, true);
+ std::string result = this->Convert(remote, local, format, true);
// Consider short-path.
const char* remotePath = this->GetRelativeRootPath(remote);
- return this->ConvertToOutputForExistingCommon(remotePath, result);
+ return this->ConvertToOutputForExistingCommon(remotePath, result, format);
}
//----------------------------------------------------------------------------