diff options
author | Brad King <brad.king@kitware.com> | 2023-01-20 14:35:49 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-01-20 14:36:00 (GMT) |
commit | 1d52007564f114a158e9f1612a39e6b33ca37934 (patch) | |
tree | 8c0d131227934d651219b4b869bfb5ee5b8d0840 /Source/cmNinjaNormalTargetGenerator.cxx | |
parent | 8150831dfdc445316256c8acdbcf9fd29bced58d (diff) | |
parent | 4165eb3d0b21601977b26e8f8af5193c55169cee (diff) | |
download | CMake-1d52007564f114a158e9f1612a39e6b33ca37934.zip CMake-1d52007564f114a158e9f1612a39e6b33ca37934.tar.gz CMake-1d52007564f114a158e9f1612a39e6b33ca37934.tar.bz2 |
Merge topic 'ninja-swift-exported-executables'
4165eb3d0b Ninja: Emit swiftmodule from executable with exports
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8048
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index b8f851f..d481b64 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -644,14 +644,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd( } break; case cmStateEnums::SHARED_LIBRARY: case cmStateEnums::MODULE_LIBRARY: - break; case cmStateEnums::EXECUTABLE: - if (this->TargetLinkLanguage(config) == "Swift") { - if (this->GeneratorTarget->IsExecutableWithExports()) { - this->Makefile->GetDefExpandList("CMAKE_EXE_EXPORTS_Swift_FLAG", - linkCmds); - } - } break; default: assert(false && "Unexpected target type"); @@ -1112,7 +1105,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement( this->GetObjectFilePath(source, config)); } } - if (targetType != cmStateEnums::EXECUTABLE) { + if (targetType != cmStateEnums::EXECUTABLE || + gt->IsExecutableWithExports()) { linkBuild.Outputs.push_back(vars["SWIFT_MODULE"]); } } else { |