File tree 2 files changed +12
-8
lines changed 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -339,15 +339,16 @@ bool cmGlobalGenerator::CheckTargetsForType() const
339
339
bool failed = false ;
340
340
for (cmLocalGenerator* generator : this ->LocalGenerators ) {
341
341
for (cmGeneratorTarget* target : generator->GetGeneratorTargets ()) {
342
- std::vector<std::string> configs;
343
- target->Makefile ->GetConfigurations (configs);
344
- if (configs.empty ()) {
345
- configs.emplace_back ();
346
- }
342
+ if (target->GetType () == cmStateEnums::EXECUTABLE &&
343
+ target->GetPropertyAsBool (" WIN32_EXECUTABLE" )) {
344
+ std::vector<std::string> configs;
345
+ target->Makefile ->GetConfigurations (configs);
346
+ if (configs.empty ()) {
347
+ configs.emplace_back ();
348
+ }
347
349
348
- for (std::string const & config : configs) {
349
- if (target->GetLinkerLanguage (config) == " Swift" ) {
350
- if (target->GetPropertyAsBool (" WIN32_EXECUTABLE" )) {
350
+ for (std::string const & config : configs) {
351
+ if (target->GetLinkerLanguage (config) == " Swift" ) {
351
352
this ->GetCMakeInstance ()->IssueMessage (
352
353
MessageType::FATAL_ERROR,
353
354
" WIN32_EXECUTABLE property is not supported on Swift "
Original file line number Diff line number Diff line change @@ -8,3 +8,6 @@ elseif(NOT XCODE_VERSION VERSION_LESS 8.0)
8
8
endif ()
9
9
10
10
add_executable (SwiftOnly main.swift)
11
+
12
+ # Dummy to make sure generation works with such targets.
13
+ add_library (SwiftIface INTERFACE )
You can’t perform that action at this time.
0 commit comments