summaryrefslogtreecommitdiffstats
path: root/Source
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 /Source
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 'Source')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx13
1 files changed, 10 insertions, 3 deletions
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(