mirror of
https://github.com/reactos/CMake.git
synced 2025-02-07 20:38:49 +00:00
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
This commit is contained in:
commit
e4193adf29
@ -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 "
|
||||
|
@ -8,3 +8,6 @@ elseif(NOT XCODE_VERSION VERSION_LESS 8.0)
|
||||
endif()
|
||||
|
||||
add_executable(SwiftOnly main.swift)
|
||||
|
||||
# Dummy to make sure generation works with such targets.
|
||||
add_library(SwiftIface INTERFACE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user