mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 07:11:05 -06:00
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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user