mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 05:50:42 +00:00
601fe84bd1
The check added in commit b06f4c8a74
(Swift: disallow WIN32_EXECUTABLE
properties, 2019-05-31, v3.15.0-rc1~9^2) makes sense only for
executables because the `WIN32_EXECUTABLE` property is defined only for
them. Running the check on other target types, particularly those that
do not link such as INTERFACE libraries, violates internal assumptions.
In particular, `GetLinkerLanguage` should not be called on such targets.
Fixes: #19528
14 lines
363 B
CMake
14 lines
363 B
CMake
cmake_minimum_required(VERSION 3.3)
|
|
project(SwiftOnly Swift)
|
|
|
|
if(NOT XCODE_VERSION VERSION_LESS 10.2)
|
|
set(CMAKE_Swift_LANGUAGE_VERSION 5.0)
|
|
elseif(NOT XCODE_VERSION VERSION_LESS 8.0)
|
|
set(CMAKE_Swift_LANGUAGE_VERSION 3.0)
|
|
endif()
|
|
|
|
add_executable(SwiftOnly main.swift)
|
|
|
|
# Dummy to make sure generation works with such targets.
|
|
add_library(SwiftIface INTERFACE)
|