summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-04 18:04:02 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-04 18:04:02 (GMT)
commit0c0ef9e7b7016f8ce6310c30660151b15e062a93 (patch)
tree5fbd4980f09f5ca26cd827a5f635be7befd8f38c /Source
parent02bebd60e9255b6e3eb4bbd6208b4c5cd8f5da40 (diff)
downloadCMake-0c0ef9e7b7016f8ce6310c30660151b15e062a93.zip
CMake-0c0ef9e7b7016f8ce6310c30660151b15e062a93.tar.gz
CMake-0c0ef9e7b7016f8ce6310c30660151b15e062a93.tar.bz2
cmLocalGenerator: Add format option to ConvertToIncludeReference
Replace the hard-coded SHELL output format with an optional argument.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx5
-rw-r--r--Source/cmLocalGenerator.h3
-rw-r--r--Source/cmLocalNinjaGenerator.cxx5
-rw-r--r--Source/cmLocalNinjaGenerator.h3
4 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 87685d5..2090cc6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -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);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 9e47120..986f405 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -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 */,
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index cd12c9d..c989cfb 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -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);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index ea854c6..b3d3b6b 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -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: