cmLocalGenerator: Simplify some GetIncludeFlag call sites

The path style argument is meaningful only with the Ninja generator,
so drop it from call sites in Makefile and Xcode generators.
This commit is contained in:
Brad King
2021-02-24 09:00:59 -05:00
parent a133a583d4
commit 3e7dd39747
2 changed files with 5 additions and 9 deletions

View File

@@ -991,10 +991,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
includes, genexInterpreter.Evaluate(*cincludes, INCLUDE_DIRECTORIES),
*sf);
}
lg->AppendFlags(
flags,
lg->GetIncludeFlags(includes, gtgt, lang, std::string(), false,
cmLocalGenerator::IncludePathStyle::Absolute));
lg->AppendFlags(flags,
lg->GetIncludeFlags(includes, gtgt, lang, std::string()));
cmXCodeObject* buildFile =
this->CreateXCodeBuildFileFromPath(sf->ResolveFullPath(), gtgt, lang, sf);
@@ -2698,8 +2696,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
// GNU assembly files (#16449)
for (auto const& language : languages) {
std::string includeFlags = this->CurrentLocalGenerator->GetIncludeFlags(
includes, gtgt, language, configName, false,
cmLocalGenerator::IncludePathStyle::Absolute);
includes, gtgt, language, configName);
if (!includeFlags.empty()) {
cflags[language] += " " + includeFlags;

View File

@@ -854,8 +854,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
vars.Defines = definesString.c_str();
std::string includesString = this->LocalGenerator->GetIncludeFlags(
includes, this->GeneratorTarget, lang, config, false,
cmLocalGenerator::IncludePathStyle::Absolute);
includes, this->GeneratorTarget, lang, config);
this->LocalGenerator->AppendFlags(includesString,
"$(" + lang + "_INCLUDES)");
vars.Includes = includesString.c_str();
@@ -2197,7 +2196,7 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags,
std::string includeFlags = this->LocalGenerator->GetIncludeFlags(
includes, this->GeneratorTarget, lang, this->GetConfigName(),
useResponseFile, cmLocalGenerator::IncludePathStyle::Default);
useResponseFile);
if (includeFlags.empty()) {
return;
}