summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-01-18 15:56:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-01-18 15:56:23 (GMT)
commit9ce1c870374dc1ab910ed921f41d03df75f254f3 (patch)
treea4cb001ddacb2c0b781496e7e62599432046dfc8 /Modules
parent4ad38700c9d1aa41bd8dc984215daafed0b94330 (diff)
parent44abf248486fca72e59a5a94f5c79b4914d2cfd8 (diff)
downloadCMake-9ce1c870374dc1ab910ed921f41d03df75f254f3.zip
CMake-9ce1c870374dc1ab910ed921f41d03df75f254f3.tar.gz
CMake-9ce1c870374dc1ab910ed921f41d03df75f254f3.tar.bz2
Merge topic 'swift-ios'
44abf24848 Swift: Add comment about where platform-specific flags should go 9a013c9e9d Swift: Use macOS-style linker flags on iOS, tvOS, and watchOS too Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8070
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeSwiftInformation.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index 62f7ef2..64c7519 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -20,16 +20,19 @@ 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 ")
-if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
+
+# 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 ")
- if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
+ 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_EXECUTABLE_RUNTIME_Swift_FLAG_SEP "")
set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG_SEP "")
else()