summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-20 14:01:00 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-02-20 14:01:58 (GMT)
commitbb6d46d7e4f65bad099b919ffb1e34c0571ca727 (patch)
treedf344c00d7e33fdbbebb5dcb15ce3a20f0fdac04 /Source/cmNinjaTargetGenerator.cxx
parent8732a2b3ba81d7e512d8c317b037db5caec10ee4 (diff)
parentc048cb75fcee6b31cfacdce714b343c6623f5c9c (diff)
downloadCMake-bb6d46d7e4f65bad099b919ffb1e34c0571ca727.zip
CMake-bb6d46d7e4f65bad099b919ffb1e34c0571ca727.tar.gz
CMake-bb6d46d7e4f65bad099b919ffb1e34c0571ca727.tar.bz2
Merge topic 'ninja-swift-partial'
c048cb75fc Ninja: add properties for Swift partial module and doc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2985
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 8d2586d..6013cd0 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -455,6 +455,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
vars.SwiftAuxiliarySources = "$SWIFT_AUXILIARY_SOURCES";
vars.SwiftModuleName = "$SWIFT_MODULE_NAME";
vars.SwiftLibraryName = "$SWIFT_LIBRARY_NAME";
+ vars.SwiftPartialModule = "$SWIFT_PARTIAL_MODULE";
+ vars.SwiftPartialDoc = "$SWIFT_PARTIAL_DOC";
}
// For some cases we do an explicit preprocessor invocation.
@@ -945,6 +947,18 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
cmGeneratorTarget::Names targetNames =
this->GeneratorTarget->GetLibraryNames(this->GetConfigName());
vars["SWIFT_LIBRARY_NAME"] = targetNames.Base;
+
+ if (const char* partial = source->GetProperty("SWIFT_PARTIAL_MODULE")) {
+ vars["SWIFT_PARTIAL_MODULE"] = partial;
+ } else {
+ vars["SWIFT_PARTIAL_MODULE"] = objectFileName + ".swiftmodule";
+ }
+
+ if (const char* partial = source->GetProperty("SWIFT_PARTIAL_DOC")) {
+ vars["SWIFT_PARTIAL_DOC"] = partial;
+ } else {
+ vars["SWIFT_PARTIAL_DOC"] = objectFileName + ".swiftdoc";
+ }
}
if (!this->NeedDepTypeMSVC(language)) {