diff options
author | Brad King <brad.king@kitware.com> | 2014-10-10 13:57:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-13 12:20:05 (GMT) |
commit | f4c5eade787f4f0a6e33fe029c2816580db06041 (patch) | |
tree | 549735d61c4a2e81c9a05a0e9613b0bc756c8ce4 /Source/cmLocalGenerator.cxx | |
parent | 5ab9aa62fe1e5e1e74bafc69bf0e8d16f118ac9d (diff) | |
download | CMake-f4c5eade787f4f0a6e33fe029c2816580db06041.zip CMake-f4c5eade787f4f0a6e33fe029c2816580db06041.tar.gz CMake-f4c5eade787f4f0a6e33fe029c2816580db06041.tar.bz2 |
Ninja: Fix RC include directories regression
Changes in commit b9aa5041 (cmLocalGenerator: Simplify GetIncludeFlags
output formatting, 2014-03-04) caused Windows Resource Compiler include
directories to be computed as relative paths in the Ninja generator.
This breaks the cmcldeps handling of include paths. The reason for the
regression is that several cmLocalGenerator::GetIncludeFlags callers
treated the fourth "bool forResponseFile" argument as if it controlled
whether include directories were a full path. It actually did control
that by accident until the above commit.
Add an explicit "bool forceFullPaths" argument to GetIncludeFlags
and thread the value through ConvertToIncludeReference as needed.
Update GetIncludeFlags call sites that really wanted to control the
forResponseFile setting to be aware of the new argument. Extend the
VSResource test to cover this case.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 9 |
1 files changed, 6 insertions, 3 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 << "\""; |