diff options
-rw-r--r-- | Modules/CMakeSwiftInformation.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/Android/Determine-Compiler-NDK.cmake | 1 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 13 |
4 files changed, 15 insertions, 5 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) diff --git a/Modules/Platform/Android/Determine-Compiler-NDK.cmake b/Modules/Platform/Android/Determine-Compiler-NDK.cmake index e009c10..f56e1d5 100644 --- a/Modules/Platform/Android/Determine-Compiler-NDK.cmake +++ b/Modules/Platform/Android/Determine-Compiler-NDK.cmake @@ -23,6 +23,7 @@ if(CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED) set(_ANDROID_TOOL_CXX_COMPILER_EXTERNAL_TOOLCHAIN "") set(_ANDROID_TOOL_CXX_TOOLCHAIN_PREFIX "${CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED}/bin/${CMAKE_ANDROID_ARCH_TRIPLE}-") set(_ANDROID_TOOL_CXX_TOOLCHAIN_SUFFIX "${_ANDROID_HOST_EXT}") + set(_CMAKE_TOOLCHAIN_PREFIX "${CMAKE_ANDROID_ARCH_TRIPLE}-") return() endif() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6478de0..76adb83 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 16) -set(CMake_VERSION_PATCH 20200203) +set(CMake_VERSION_PATCH 20200204) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index ffb269a..ff79a17 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -551,16 +551,23 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd( linkCmds.push_back(cmakeCommand + " -E touch $TARGET_FILE"); } #endif - return linkCmds; - } + } break; case cmStateEnums::SHARED_LIBRARY: case cmStateEnums::MODULE_LIBRARY: + break; case cmStateEnums::EXECUTABLE: + if (this->TargetLinkLanguage(config) == "Swift") { + if (this->GeneratorTarget->IsExecutableWithExports()) { + const std::string flags = + this->Makefile->GetSafeDefinition("CMAKE_EXE_EXPORTS_Swift_FLAG"); + cmExpandList(flags, linkCmds); + } + } break; default: assert(false && "Unexpected target type"); } - return std::vector<std::string>(); + return linkCmds; } void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement( |