summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-10-13 12:21:04 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-10-13 12:21:04 (GMT)
commitcea13d5536ef77fb93ef8ae5abfa9c81920140e7 (patch)
tree543640745dc1c8921f6b3033e4b250ebe6447e1a /Source
parentc11a342e652be170e232d100474836a239037623 (diff)
parentf4c5eade787f4f0a6e33fe029c2816580db06041 (diff)
downloadCMake-cea13d5536ef77fb93ef8ae5abfa9c81920140e7.zip
CMake-cea13d5536ef77fb93ef8ae5abfa9c81920140e7.tar.gz
CMake-cea13d5536ef77fb93ef8ae5abfa9c81920140e7.tar.bz2
Merge topic 'fix-ninja-rc-include-flags'
f4c5eade Ninja: Fix RC include directories regression
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx9
-rw-r--r--Source/cmLocalGenerator.h4
-rw-r--r--Source/cmLocalNinjaGenerator.cxx5
-rw-r--r--Source/cmLocalNinjaGenerator.h3
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
5 files changed, 15 insertions, 8 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 4bd9191..50e279b 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1287,9 +1287,11 @@ cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote,
//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConvertToIncludeReference(std::string const& path,
- OutputFormat format)
+ OutputFormat format,
+ bool forceFullPaths)
{
- return this->ConvertToOutputForExisting(path, START_OUTPUT, format);
+ return this->ConvertToOutputForExisting(
+ path, forceFullPaths? FULL : START_OUTPUT, format);
}
//----------------------------------------------------------------------------
@@ -1297,6 +1299,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
const std::vector<std::string> &includes,
cmGeneratorTarget* target,
const std::string& lang,
+ bool forceFullPaths,
bool forResponseFile,
const std::string& config)
{
@@ -1401,7 +1404,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
flagUsed = true;
}
std::string includePath =
- this->ConvertToIncludeReference(*i, shellFormat);
+ this->ConvertToIncludeReference(*i, shellFormat, forceFullPaths);
if(quotePaths && includePath.size() && includePath[0] != '\"')
{
includeFlags << "\"";
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index b25b9ab..3a9d5be 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -160,6 +160,7 @@ public:
std::string GetIncludeFlags(const std::vector<std::string> &includes,
cmGeneratorTarget* target,
const std::string& lang,
+ bool forceFullPaths = false,
bool forResponseFile = false,
const std::string& config = "");
@@ -215,7 +216,8 @@ public:
OutputFormat format = SHELL);
virtual std::string ConvertToIncludeReference(std::string const& path,
- OutputFormat format = SHELL);
+ OutputFormat format = SHELL,
+ bool forceFullPaths = false);
/** Called from command-line hook to clear dependencies. */
virtual void ClearDependencies(cmMakefile* /* mf */,
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 5522e0d..398b55a 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -151,9 +151,10 @@ cmLocalNinjaGenerator::ConvertToLinkReference(std::string const& lib,
std::string
cmLocalNinjaGenerator::ConvertToIncludeReference(std::string const& path,
- OutputFormat format)
+ OutputFormat format,
+ bool forceFullPaths)
{
- return this->Convert(path, HOME_OUTPUT, format);
+ return this->Convert(path, forceFullPaths? FULL : HOME_OUTPUT, format);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index c787ac6..1d27224 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -108,7 +108,8 @@ public:
protected:
virtual std::string ConvertToIncludeReference(std::string const& path,
- OutputFormat format = SHELL);
+ OutputFormat format = SHELL,
+ bool forceFullPaths = false);
private:
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 7849d12..1f8f686 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1962,7 +1962,7 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags,
std::string includeFlags =
this->LocalGenerator->GetIncludeFlags(includes, this->GeneratorTarget,
- lang, useResponseFile);
+ lang, false, useResponseFile);
if(includeFlags.empty())
{
return;