cmLocalGenerator: Add format option to ConvertToIncludeReference

Replace the hard-coded SHELL output format with an optional argument.
This commit is contained in:
Brad King 2014-03-04 13:04:02 -05:00
parent 02bebd60e9
commit 0c0ef9e7b7
4 changed files with 10 additions and 6 deletions

View File

@ -1277,9 +1277,10 @@ cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote,
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConvertToIncludeReference(std::string const& path)
cmLocalGenerator::ConvertToIncludeReference(std::string const& path,
OutputFormat format)
{
return this->ConvertToOutputForExisting(path.c_str());
return this->ConvertToOutputForExisting(path.c_str(), START_OUTPUT, format);
}
//----------------------------------------------------------------------------

View File

@ -207,7 +207,8 @@ public:
const char* local = 0,
OutputFormat format = SHELL);
virtual std::string ConvertToIncludeReference(std::string const& path);
virtual std::string ConvertToIncludeReference(std::string const& path,
OutputFormat format = SHELL);
/** Called from command-line hook to clear dependencies. */
virtual void ClearDependencies(cmMakefile* /* mf */,

View File

@ -149,9 +149,10 @@ cmLocalNinjaGenerator::ConvertToLinkReference(std::string const& lib)
}
std::string
cmLocalNinjaGenerator::ConvertToIncludeReference(std::string const& path)
cmLocalNinjaGenerator::ConvertToIncludeReference(std::string const& path,
OutputFormat format)
{
return this->Convert(path.c_str(), HOME_OUTPUT, SHELL);
return this->Convert(path.c_str(), HOME_OUTPUT, format);
}
//----------------------------------------------------------------------------

View File

@ -101,7 +101,8 @@ public:
protected:
virtual std::string ConvertToIncludeReference(std::string const& path);
virtual std::string ConvertToIncludeReference(std::string const& path,
OutputFormat format = SHELL);
private: