summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeSwiftInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-01-13 17:06:22 (GMT)
committerBrad King <brad.king@kitware.com>2023-01-17 14:21:15 (GMT)
commit44abf248486fca72e59a5a94f5c79b4914d2cfd8 (patch)
tree9755b216307dda3da663f44b37bf05a7a7a53f32 /Modules/CMakeSwiftInformation.cmake
parent9a013c9e9d344f9703f339c6aeab9dcc303b53c0 (diff)
downloadCMake-44abf248486fca72e59a5a94f5c79b4914d2cfd8.zip
CMake-44abf248486fca72e59a5a94f5c79b4914d2cfd8.tar.gz
CMake-44abf248486fca72e59a5a94f5c79b4914d2cfd8.tar.bz2
Swift: Add comment about where platform-specific flags should go
Diffstat (limited to 'Modules/CMakeSwiftInformation.cmake')
-rw-r--r--Modules/CMakeSwiftInformation.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index 707635b..64c7519 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -20,13 +20,14 @@ endif()
set(CMAKE_EXE_EXPORTS_Swift_FLAG "-emit-module -emit-module-path <SWIFT_MODULE> ${CMAKE_Swift_IMPLIB_LINKER_FLAGS}")
set(CMAKE_INCLUDE_FLAG_Swift "-I ")
+
+# FIXME: Move compiler- and platform-specific flags to the above-included modules.
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS"
OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAKE_SYSTEM_NAME STREQUAL "watchOS")
set(CMAKE_SHARED_LIBRARY_SONAME_Swift_FLAG "-Xlinker -install_name -Xlinker ")
elseif(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
set(CMAKE_SHARED_LIBRARY_SONAME_Swift_FLAG "-Xlinker -soname -Xlinker ")
endif()
-
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG "-Xlinker -rpath -Xlinker ")
set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG "-Xlinker -rpath -Xlinker ")