summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-04 13:27:42 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-04 13:27:49 (GMT)
commit451ce7e4109b54783486e9243e2bfecdaeeaea2e (patch)
tree24d0f18966e734537e2f4d5d7b38bf5c93cb1817 /Modules
parentd6995226c9aba5f370bfbb35739bca98ed1d484f (diff)
parent1e26d57188d5cd4be6869a0602e6021c4b2bd3e3 (diff)
downloadCMake-451ce7e4109b54783486e9243e2bfecdaeeaea2e.zip
CMake-451ce7e4109b54783486e9243e2bfecdaeeaea2e.tar.gz
CMake-451ce7e4109b54783486e9243e2bfecdaeeaea2e.tar.bz2
Merge topic 'swift-exe-exports'
1e26d57188 Ninja: properly handle exports from Swift exes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4314
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeSwiftInformation.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index 672d3f8..848934c 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -17,6 +17,8 @@ if(CMAKE_Swift_COMPILER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_Swift_COMPILER_ID}-Swift OPTIONAL)
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)
set(CMAKE_SHARED_LIBRARY_SONAME_Swift_FLAG "-Xlinker -install_name -Xlinker ")
@@ -81,7 +83,7 @@ if(NOT CMAKE_Swift_CREATE_SHARED_MODULE)
endif()
if(NOT CMAKE_Swift_LINK_EXECUTABLE)
- set(CMAKE_Swift_LINK_EXECUTABLE "<CMAKE_Swift_COMPILER> -output-file-map <SWIFT_OUTPUT_FILE_MAP> -incremental -j ${CMAKE_Swift_NUM_THREADS} -emit-executable -o <TARGET> -emit-module -emit-module-path <SWIFT_MODULE> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> ${CMAKE_Swift_IMPLIB_LINKER_FLAGS} <LINK_LIBRARIES>")
+ set(CMAKE_Swift_LINK_EXECUTABLE "<CMAKE_Swift_COMPILER> -output-file-map <SWIFT_OUTPUT_FILE_MAP> -incremental -j ${CMAKE_Swift_NUM_THREADS} -emit-executable -o <TARGET> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> <LINK_LIBRARIES>")
endif()
if(NOT CMAKE_Swift_CREATE_STATIC_LIBRARY)