summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx33
-rw-r--r--Source/cmNinjaTargetGenerator.cxx45
-rw-r--r--Source/cmRulePlaceholderExpander.cxx40
-rw-r--r--Source/cmRulePlaceholderExpander.h8
4 files changed, 0 insertions, 126 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 680f881..770d80c 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -281,11 +281,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType());
vars.Language = this->TargetLinkLanguage.c_str();
- if (this->TargetLinkLanguage == "Swift") {
- vars.SwiftPartialModules = "$SWIFT_PARTIAL_MODULES";
- vars.TargetSwiftModule = "$TARGET_SWIFT_MODULE";
- vars.TargetSwiftDoc = "$TARGET_SWIFT_DOC";
- }
std::string responseFlag;
if (!useResponseFile) {
@@ -804,34 +799,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
cmNinjaDeps outputs;
outputs.push_back(targetOutputReal);
- if (this->TargetLinkLanguage == "Swift") {
- if (const char* name = gt.GetProperty("SWIFT_MODULE_NAME")) {
- vars["TARGET_SWIFT_DOC"] = std::string(name) + ".swiftdoc";
- vars["TARGET_SWIFT_MODULE"] = std::string(name) + ".swiftmodule";
- } else {
- vars["TARGET_SWIFT_DOC"] = gt.GetName() + ".swiftdoc";
- vars["TARGET_SWIFT_MODULE"] = gt.GetName() + ".swiftmodule";
- }
- outputs.push_back(vars["TARGET_SWIFT_DOC"]);
- outputs.push_back(vars["TARGET_SWIFT_MODULE"]);
-
- cmLocalNinjaGenerator& localGen = *this->GetLocalGenerator();
-
- std::string partials;
- std::vector<cmSourceFile const*> sources;
- gt.GetObjectSources(sources, this->GetConfigName());
- for (cmSourceFile const* source : sources) {
- partials += " ";
- if (const char* partial = source->GetProperty("SWIFT_PARTIAL_MODULE")) {
- partials += partial;
- } else {
- partials += localGen.GetTargetDirectory(&gt) + "/" +
- gt.GetObjectName(source) + ".swiftmodule";
- }
- }
- vars["SWIFT_PARTIAL_MODULES"] = partials;
- }
-
// Compute specific libraries to link with.
cmNinjaDeps explicitDeps = this->GetObjects();
cmNinjaDeps implicitDeps = this->ComputeLinkDeps(this->TargetLinkLanguage);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 8afac70..b818107 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -19,7 +19,6 @@
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalNinjaGenerator.h"
-#include "cmListFileCache.h" // for BT
#include "cmLocalGenerator.h"
#include "cmLocalNinjaGenerator.h"
#include "cmMakefile.h"
@@ -455,13 +454,6 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
vars.TargetCompilePDB = "$TARGET_COMPILE_PDB";
vars.ObjectDir = "$OBJECT_DIR";
vars.ObjectFileDir = "$OBJECT_FILE_DIR";
- if (lang == "Swift") {
- 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.
bool const explicitPP = this->NeedExplicitPreprocessing(lang);
@@ -947,43 +939,6 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
vars["DEFINES"] = this->ComputeDefines(source, language);
vars["INCLUDES"] = this->ComputeIncludes(source, language);
- if (language == "Swift") {
- // The swift compiler needs all the sources besides the one being compiled
- // in order to do the type checking. List all these "auxiliary" sources.
- std::string aux_sources;
- cmGeneratorTarget::KindedSources const& sources =
- this->GeneratorTarget->GetKindedSources(this->GetConfigName());
- for (cmGeneratorTarget::SourceAndKind const& src : sources.Sources) {
- if (src.Source.Value == source) {
- continue;
- }
- aux_sources += " " + this->GetSourceFilePath(src.Source.Value);
- }
- vars["SWIFT_AUXILIARY_SOURCES"] = aux_sources;
-
- if (const char* name =
- this->GeneratorTarget->GetProperty("SWIFT_MODULE_NAME")) {
- vars["SWIFT_MODULE_NAME"] = name;
- } else {
- vars["SWIFT_MODULE_NAME"] = this->GeneratorTarget->GetName();
- }
-
- 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)) {
bool replaceExt(false);
diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx
index 309ee30..8751a11 100644
--- a/Source/cmRulePlaceholderExpander.cxx
+++ b/Source/cmRulePlaceholderExpander.cxx
@@ -162,46 +162,6 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable(
}
}
}
- if (replaceValues.SwiftAuxiliarySources) {
- if (variable == "SWIFT_AUXILIARY_SOURCES") {
- return replaceValues.SwiftAuxiliarySources;
- }
- }
- if (replaceValues.SwiftModuleName) {
- if (variable == "SWIFT_MODULE_NAME") {
- return replaceValues.SwiftModuleName;
- }
- }
- if (replaceValues.SwiftLibraryName) {
- if (variable == "SWIFT_LIBRARY_NAME") {
- return replaceValues.SwiftLibraryName;
- }
- }
- if (replaceValues.SwiftPartialDoc) {
- if (variable == "SWIFT_PARTIAL_DOC") {
- return replaceValues.SwiftPartialDoc;
- }
- }
- if (replaceValues.SwiftPartialModule) {
- if (variable == "SWIFT_PARTIAL_MODULE") {
- return replaceValues.SwiftPartialModule;
- }
- }
- if (replaceValues.SwiftPartialModules) {
- if (variable == "SWIFT_PARTIAL_MODULES") {
- return replaceValues.SwiftPartialModules;
- }
- }
- if (replaceValues.TargetSwiftDoc) {
- if (variable == "TARGET_SWIFT_DOC") {
- return replaceValues.TargetSwiftDoc;
- }
- }
- if (replaceValues.TargetSwiftModule) {
- if (variable == "TARGET_SWIFT_MODULE") {
- return replaceValues.TargetSwiftModule;
- }
- }
if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" ||
variable == "TARGET_INSTALLNAME_DIR") {
// All these variables depend on TargetSOName
diff --git a/Source/cmRulePlaceholderExpander.h b/Source/cmRulePlaceholderExpander.h
index ebd4d41..4a03dc8 100644
--- a/Source/cmRulePlaceholderExpander.h
+++ b/Source/cmRulePlaceholderExpander.h
@@ -58,14 +58,6 @@ public:
const char* Includes;
const char* DependencyFile;
const char* FilterPrefix;
- const char* SwiftAuxiliarySources;
- const char* SwiftModuleName;
- const char* SwiftLibraryName;
- const char* SwiftPartialModule;
- const char* SwiftPartialDoc;
- const char* TargetSwiftModule;
- const char* TargetSwiftDoc;
- const char* SwiftPartialModules;
};
// Expand rule variables in CMake of the type found in language rules