This provides a mechanism for the local generator to override how
header search paths are generated.
---
 Source/cmLocalGenerator.cxx |    9 ++++++++-
 Source/cmLocalGenerator.h   |    4 +++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 6af7fd5..aeda164 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1185,6 +1185,13 @@ 
cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote,
 }
 
 //----------------------------------------------------------------------------
+std::string
+cmLocalGenerator::ConvertToIncludeReference(std::string const& path)
+{
+  return this->ConvertToOutputForExisting(path.c_str());
+}
+
+//----------------------------------------------------------------------------
 const char* cmLocalGenerator::GetIncludeFlags(const char* lang,
                                               bool forResponseFile)
 {
@@ -1285,7 +1292,7 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* 
lang,
       }
     else
       {
-      includePath = this->ConvertToOutputForExisting(i->c_str());
+      includePath = this->ConvertToIncludeReference(*i);
       }
     if(quotePaths && includePath.size() && includePath[0] != '\"')
       {
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 69e452b..c0fe886 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -179,7 +179,9 @@ public:
       path and short path if spaces.  */
   std::string ConvertToOutputForExisting(RelativeRoot remote,
                                          const char* local = 0);
-  
+
+  virtual std::string ConvertToIncludeReference(std::string const& path);
+
   /** Called from command-line hook to clear dependencies.  */
   virtual void ClearDependencies(cmMakefile* /* mf */, 
                                  bool /* verbose */) {}
-- 
1.7.5.3

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to