summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-28 13:55:36 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-28 13:55:44 (GMT)
commitd828d0eb084cf094119d2b47dae0053267aba138 (patch)
tree00e258c1611d49ebcf08a1eefa58558e40ae3996 /Source/cmLocalGenerator.cxx
parent2911d4701675d17b817f8fbe607bb5a493cacf0c (diff)
parent47990f9fef31eb4369bb01d72a6d86de332ae196 (diff)
downloadCMake-d828d0eb084cf094119d2b47dae0053267aba138.zip
CMake-d828d0eb084cf094119d2b47dae0053267aba138.tar.gz
CMake-d828d0eb084cf094119d2b47dae0053267aba138.tar.bz2
Merge topic 'refactor-ipo-flags'
47990f9f Inline and remove AddFeatureFlags method a8667467 Add IPO compiler flags more consistently in generators Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !772
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 424ab6f..57b744c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -985,7 +985,7 @@ void cmLocalGenerator::GetTargetFlags(
target->GetName().c_str());
return;
}
- this->AddLanguageFlags(flags, linkLanguage, buildType);
+ this->AddLanguageFlags(flags, target, linkLanguage, buildType);
if (pcli) {
this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs,
frameworkPath, linkPath);
@@ -1050,11 +1050,7 @@ void cmLocalGenerator::GetTargetCompileFlags(cmGeneratorTarget* target,
cmMakefile* mf = this->GetMakefile();
// Add language-specific flags.
- this->AddLanguageFlags(flags, lang, config);
-
- if (target->IsIPOEnabled(config)) {
- this->AppendFeatureOptions(flags, lang, "IPO");
- }
+ this->AddLanguageFlags(flags, target, lang, config);
this->AddArchitectureFlags(flags, target, lang, config);
@@ -1287,6 +1283,7 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
}
void cmLocalGenerator::AddLanguageFlags(std::string& flags,
+ cmGeneratorTarget const* target,
const std::string& lang,
const std::string& config)
{
@@ -1295,6 +1292,10 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
flagsVar += lang;
flagsVar += "_FLAGS";
this->AddConfigVariableFlags(flags, flagsVar, config);
+
+ if (target->IsIPOEnabled(config)) {
+ this->AppendFeatureOptions(flags, lang, "IPO");
+ }
}
cmGeneratorTarget* cmLocalGenerator::FindGeneratorTargetToUse(