mirror of
https://github.com/Kitware/CMake.git
synced 2026-06-24 08:47:59 +00:00
The target info in Swift 6.2 and newer supports emitting the pointer size for a given target triple. We can use that to set the Swift data pointer size, and the `CMAKE_SIZEOF_VOID_P`. Fixes: #26649
26 lines
971 B
CMake
26 lines
971 B
CMake
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
# file LICENSE.rst or https://cmake.org/licensing for details.
|
|
|
|
set(CMAKE_Swift_COMPILER "@CMAKE_Swift_COMPILER@")
|
|
set(CMAKE_Swift_COMPILER_ID "@CMAKE_Swift_COMPILER_ID@")
|
|
set(CMAKE_Swift_COMPILER_VERSION "@CMAKE_Swift_COMPILER_VERSION@")
|
|
|
|
set(CMAKE_Swift_COMPILER_LOADED 1)
|
|
set(CMAKE_Swift_COMPILER_WORKS "@CMAKE_Swift_COMPILER_WORKS@")
|
|
|
|
set(CMAKE_Swift_COMPILER_ENV_VAR "SWIFTC")
|
|
|
|
set(CMAKE_Swift_COMPILER_ID_RUN 1)
|
|
set(CMAKE_Swift_SOURCE_FILE_EXTENSIONS swift)
|
|
|
|
set(CMAKE_Swift_COMPILER_USE_OLD_DRIVER "@CMAKE_Swift_COMPILER_USE_OLD_DRIVER@")
|
|
|
|
set(CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES "@CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES@")
|
|
|
|
set(CMAKE_Swift_MODULE_TRIPLE "@CMAKE_Swift_MODULE_TRIPLE@")
|
|
set(CMAKE_Swift_SIZEOF_DATA_PTR "@CMAKE_Swift_SIZEOF_DATA_PTR@")
|
|
|
|
if(NOT CMAKE_SIZEOF_VOID_P AND CMAKE_Swift_SIZEOF_DATA_PTR)
|
|
set(CMAKE_SIZEOF_VOID_P "${CMAKE_Swift_SIZEOF_DATA_PTR}")
|
|
endif()
|