summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-01 17:37:02 (GMT)
committerBrad King <brad.king@kitware.com>2019-04-02 18:23:32 (GMT)
commit8ca1b262863d8a5cbb8306a52873101c2e940f78 (patch)
treec13cb9d3c3fd2927b89f37b3cd2895d4cb5bd09a /Source/cmGlobalXCodeGenerator.cxx
parent3e129d71bc12a325c0548aaaea24470cd172470b (diff)
downloadCMake-8ca1b262863d8a5cbb8306a52873101c2e940f78.zip
CMake-8ca1b262863d8a5cbb8306a52873101c2e940f78.tar.gz
CMake-8ca1b262863d8a5cbb8306a52873101c2e940f78.tar.bz2
cmLocalGenerator: Factor IPO logic out of AddLanguageFlags
The IPO flag logic was added to `AddLanguageFlags` based on my advice. However, this method should really only be about `CMAKE_<LANG>_FLAGS*` variables. Move the IPO logic out to its call sites.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index af165f6..2fc6121 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1800,6 +1800,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
this->CurrentLocalGenerator->AddLanguageFlags(flags, gtgt, lang,
configName);
+ if (gtgt->IsIPOEnabled(lang, configName)) {
+ this->CurrentLocalGenerator->AppendFeatureOptions(flags, lang, "IPO");
+ }
+
// Add shared-library flags if needed.
this->CurrentLocalGenerator->AddCMP0018Flags(flags, gtgt, lang,
configName);