diff options
author | Brad King <brad.king@kitware.com> | 2017-06-14 14:12:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-14 14:36:57 (GMT) |
commit | ba247ccabab05c0aad4fe7f56dd020bfa8ff4583 (patch) | |
tree | 259898e83b41d70b454287d01e88923ecb1bbd4e /Source/cmLocalGenerator.cxx | |
parent | d025faf436c86ee9cc033fbb324a9bc2c18757fa (diff) | |
download | CMake-ba247ccabab05c0aad4fe7f56dd020bfa8ff4583.zip CMake-ba247ccabab05c0aad4fe7f56dd020bfa8ff4583.tar.gz CMake-ba247ccabab05c0aad4fe7f56dd020bfa8ff4583.tar.bz2 |
IPO: Consider support for each language separately
We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
Fortran languages. Do not try to enable support for other languages.
Furthermore, each language builds with a different compiler, so check
for support by CMake and the compiler for each language independently.
Fixes: #16944
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index bc886b6..8e00303 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1334,7 +1334,7 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags, flagsVar += "_FLAGS"; this->AddConfigVariableFlags(flags, flagsVar, config); - if (target->IsIPOEnabled(config)) { + if (target->IsIPOEnabled(lang, config)) { this->AppendFeatureOptions(flags, lang, "IPO"); } } @@ -1836,7 +1836,7 @@ void cmLocalGenerator::AppendIPOLinkerFlags(std::string& flags, const std::string& config, const std::string& lang) { - if (!target->IsIPOEnabled(config)) { + if (!target->IsIPOEnabled(lang, config)) { return; } |