|
@@ -19,7 +19,6 @@
|
|
|
#include "cmGeneratorExpression.h"
|
|
#include "cmGeneratorExpression.h"
|
|
|
#include "cmGeneratorTarget.h"
|
|
#include "cmGeneratorTarget.h"
|
|
|
#include "cmGlobalNinjaGenerator.h"
|
|
#include "cmGlobalNinjaGenerator.h"
|
|
|
-#include "cmListFileCache.h" // for BT
|
|
|
|
|
#include "cmLocalGenerator.h"
|
|
#include "cmLocalGenerator.h"
|
|
|
#include "cmLocalNinjaGenerator.h"
|
|
#include "cmLocalNinjaGenerator.h"
|
|
|
#include "cmMakefile.h"
|
|
#include "cmMakefile.h"
|
|
@@ -455,13 +454,6 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
|
|
|
vars.TargetCompilePDB = "$TARGET_COMPILE_PDB";
|
|
vars.TargetCompilePDB = "$TARGET_COMPILE_PDB";
|
|
|
vars.ObjectDir = "$OBJECT_DIR";
|
|
vars.ObjectDir = "$OBJECT_DIR";
|
|
|
vars.ObjectFileDir = "$OBJECT_FILE_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.
|
|
// For some cases we do an explicit preprocessor invocation.
|
|
|
bool const explicitPP = this->NeedExplicitPreprocessing(lang);
|
|
bool const explicitPP = this->NeedExplicitPreprocessing(lang);
|
|
@@ -947,43 +939,6 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
|
|
|
vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
|
|
vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
|
|
|
vars["DEFINES"] = this->ComputeDefines(source, language);
|
|
vars["DEFINES"] = this->ComputeDefines(source, language);
|
|
|
vars["INCLUDES"] = this->ComputeIncludes(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)) {
|
|
if (!this->NeedDepTypeMSVC(language)) {
|
|
|
bool replaceExt(false);
|
|
bool replaceExt(false);
|