summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2017-03-28 06:06:05 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-30 14:16:30 (GMT)
commita75757004bda0ff32a152a0d9d6379c02b1338ce (patch)
treecde26bb7f143fbd3358c7b7421070fbc0f7744e3 /Source/cmGeneratorTarget.cxx
parente05835c35b5d31f31e1a55baf415c075b24a27ad (diff)
downloadCMake-a75757004bda0ff32a152a0d9d6379c02b1338ce.zip
CMake-a75757004bda0ff32a152a0d9d6379c02b1338ce.tar.gz
CMake-a75757004bda0ff32a152a0d9d6379c02b1338ce.tar.bz2
Refactoring: s,GetFeatureAsBool,IsIPOEnabled,
Method 'GetFeatureAsBool' is used only with 'INTERPROCEDURAL_OPTIMIZATION' feature. Substituting 'GetFeatureAsBool' with 'IsIPOEnabled'.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index e27424f..2199e4a 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -656,9 +656,9 @@ const char* cmGeneratorTarget::GetFeature(const std::string& feature,
return this->LocalGenerator->GetFeature(feature, config);
}
-bool cmGeneratorTarget::GetFeatureAsBool(const std::string& feature,
- const std::string& config) const
+bool cmGeneratorTarget::IsIPOEnabled(const std::string& config) const
{
+ const char* feature = "INTERPROCEDURAL_OPTIMIZATION";
return cmSystemTools::IsOn(this->GetFeature(feature, config));
}
@@ -2416,7 +2416,7 @@ std::string cmGeneratorTarget::GetCreateRuleVariable(
switch (this->GetType()) {
case cmStateEnums::STATIC_LIBRARY: {
std::string var = "CMAKE_" + lang + "_CREATE_STATIC_LIBRARY";
- if (this->GetFeatureAsBool("INTERPROCEDURAL_OPTIMIZATION", config)) {
+ if (this->IsIPOEnabled(config)) {
std::string varIPO = var + "_IPO";
if (this->Makefile->GetDefinition(varIPO)) {
return varIPO;