summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-02 12:44:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-07-02 12:45:58 (GMT)
commit8a42cd155f00d9418fa60f995b466fff7c1afaa5 (patch)
tree2d947bc31ac295889880e46148b9aa5100c110d8 /Modules
parent67859b3d79606d0fe37a4e0d9dc40e58236d5b80 (diff)
parent8aa0b63bc68ebd5d7eb3f7a02f9520dac54bf813 (diff)
downloadCMake-8a42cd155f00d9418fa60f995b466fff7c1afaa5.zip
CMake-8a42cd155f00d9418fa60f995b466fff7c1afaa5.tar.gz
CMake-8a42cd155f00d9418fa60f995b466fff7c1afaa5.tar.bz2
Merge topic 'static'
8aa0b63bc6 Swift: add rules for static linking Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3492
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeSwiftInformation.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index 6f99c1f..f62f61b 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -70,6 +70,12 @@ if(NOT CMAKE_Swift_LINK_EXECUTABLE)
endif()
if(NOT CMAKE_Swift_CREATE_STATIC_LIBRARY)
+ if(CMAKE_Swift_COMPILER_TARGET)
+ set(CMAKE_Swift_CREATE_STATIC_LIBRARY "${CMAKE_Swift_COMPILER} -target <CMAKE_Swift_COMPILER_TARGET> -output-file-map <SWIFT_OUTPUT_FILE_MAP> -incremental -emit-library -static -o <TARGET> -module-name <SWIFT_MODULE_NAME> -module-link-name <SWIFT_LIBRARY_NAME> -emit-module -emit-module-path <SWIFT_MODULE> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> <LINK_LIBRARIES>")
+ else()
+ set(CMAKE_Swift_CREATE_STATIC_LIBRARY "${CMAKE_Swift_COMPILER} -output-file-map <SWIFT_OUTPUT_FILE_MAP> -incremental -emit-library -static -o <TARGET> -module-name <SWIFT_MODULE_NAME> -module-link-name <SWIFT_LIBRARY_NAME> -emit-module -emit-module-path <SWIFT_MODULE> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> <LINK_LIBRARIES>")
+ endif()
+
set(CMAKE_Swift_ARCHIVE_CREATE "<CMAKE_AR> crs <TARGET> <OBJECTS>")
set(CMAKE_Swift_ARCHIVE_FINISH "")
endif()