diff options
author | Evan Wilde <etceterawilde@gmail.com> | 2024-02-23 00:53:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-02-23 16:12:05 (GMT) |
commit | f292e28b84a8df50a8c4523c04f5e9eacc2ee772 (patch) | |
tree | 6206f711656676e39e2d154d54a2ed56471d5e8d /Source | |
parent | 9cd34156f41f428df2febd2f5782c6080e8a6fa0 (diff) | |
download | CMake-f292e28b84a8df50a8c4523c04f5e9eacc2ee772.zip CMake-f292e28b84a8df50a8c4523c04f5e9eacc2ee772.tar.gz CMake-f292e28b84a8df50a8c4523c04f5e9eacc2ee772.tar.bz2 |
Swift: Ninja: Pass module name to all swift builds
Executables that don't export a public API should not emit a
swiftmodule, but the swift modulename is observable from within the
program, so we should still set the module name on executable builds.
Fixes: #25710
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index a465b08..a88d847 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -2024,11 +2024,9 @@ void cmNinjaTargetGenerator::WriteSwiftObjectBuildStatement( this->LocalGenerator->AppendFlags( vars["FLAGS"], { emitModuleFlag, modulePathFlag, moduleFilepath }); objBuild.Outputs.push_back(moduleFilepath); - - std::string const moduleNameFlag = "-module-name"; - this->LocalGenerator->AppendFlags( - vars["FLAGS"], cmStrCat(moduleNameFlag, ' ', moduleName)); } + this->LocalGenerator->AppendFlags(vars["FLAGS"], + cmStrCat("-module-name ", moduleName)); if (target.GetType() != cmStateEnums::EXECUTABLE) { std::string const libraryLinkNameFlag = "-module-link-name"; |