summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-24 13:42:15 (GMT)
committerBrad King <brad.king@kitware.com>2021-02-25 18:24:45 (GMT)
commita133a583d484028f8b03bd791ebea8ba0cf96b84 (patch)
tree0674b75f633c0785f8b095b3606f84a6e87ba103 /Source/cmMakefileTargetGenerator.cxx
parentc99db7153337865861ccb79c8f855d4d9f3539fc (diff)
downloadCMake-a133a583d484028f8b03bd791ebea8ba0cf96b84.zip
CMake-a133a583d484028f8b03bd791ebea8ba0cf96b84.tar.gz
CMake-a133a583d484028f8b03bd791ebea8ba0cf96b84.tar.bz2
cmLocalGenerator: Clarify GetIncludeFlags signature
Make the `config` argument non-optional so all callers must be explicit. Convert the path style argument to an enumeration to make its role clear at call sites. The path style argument is implemented by `ConvertToIncludeReference`, which was introduced with the Ninja generator by commit 5b114c9bee (Introduce a cmLocalGenerator::ConvertToIncludeReference function, 2011-09-07, v2.8.7~187^2~4). Its only purpose is to allow the Ninja generator to use relative paths in `-I` flags. Add a comment explaining this role.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 4918bf6..00bf891 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -854,7 +854,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
vars.Defines = definesString.c_str();
std::string includesString = this->LocalGenerator->GetIncludeFlags(
- includes, this->GeneratorTarget, lang, true, false, config);
+ includes, this->GeneratorTarget, lang, config, false,
+ cmLocalGenerator::IncludePathStyle::Absolute);
this->LocalGenerator->AppendFlags(includesString,
"$(" + lang + "_INCLUDES)");
vars.Includes = includesString.c_str();
@@ -2195,8 +2196,8 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags,
lang, this->GetConfigName());
std::string includeFlags = this->LocalGenerator->GetIncludeFlags(
- includes, this->GeneratorTarget, lang, false, useResponseFile,
- this->GetConfigName());
+ includes, this->GeneratorTarget, lang, this->GetConfigName(),
+ useResponseFile, cmLocalGenerator::IncludePathStyle::Default);
if (includeFlags.empty()) {
return;
}