diff options
author | Brad King <brad.king@kitware.com> | 2019-07-30 15:38:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-30 15:38:35 (GMT) |
commit | e4193adf297f493a88958821b5e926677c9c985a (patch) | |
tree | acecfa8b2ad3b1c7dc6313435d27603d3fdf0ad2 /Source | |
parent | b15dbdfce856da10d3c617e109c1e3fae9ef7aee (diff) | |
parent | 601fe84bd175507b164d9a4a5ad938ed8ec3f7ec (diff) | |
download | CMake-e4193adf297f493a88958821b5e926677c9c985a.zip CMake-e4193adf297f493a88958821b5e926677c9c985a.tar.gz CMake-e4193adf297f493a88958821b5e926677c9c985a.tar.bz2 |
Merge topic 'swift-with-interface-libs'
601fe84bd1 Swift: Restore support for enabling with INTERFACE libraries
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Wanderley GuimarĂ£es da Silva <wanderley.guimaraes@gmail.com>
Acked-by: Guillaume Egles <gegles@gmail.com>
Merge-request: !3624
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 7b8ffc5..88da5eb 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -337,15 +337,16 @@ bool cmGlobalGenerator::CheckTargetsForType() const bool failed = false; for (cmLocalGenerator* generator : this->LocalGenerators) { for (cmGeneratorTarget* target : generator->GetGeneratorTargets()) { - std::vector<std::string> configs; - target->Makefile->GetConfigurations(configs); - if (configs.empty()) { - configs.emplace_back(); - } + if (target->GetType() == cmStateEnums::EXECUTABLE && + target->GetPropertyAsBool("WIN32_EXECUTABLE")) { + std::vector<std::string> configs; + target->Makefile->GetConfigurations(configs); + if (configs.empty()) { + configs.emplace_back(); + } - for (std::string const& config : configs) { - if (target->GetLinkerLanguage(config) == "Swift") { - if (target->GetPropertyAsBool("WIN32_EXECUTABLE")) { + for (std::string const& config : configs) { + if (target->GetLinkerLanguage(config) == "Swift") { this->GetCMakeInstance()->IssueMessage( MessageType::FATAL_ERROR, "WIN32_EXECUTABLE property is not supported on Swift " |