summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-05-21 15:51:53 (GMT)
committerSaleem Abdulrasool <compnerd@compnerd.org>2019-05-21 15:53:50 (GMT)
commit02c14b7fcd29a7dcedb930fe5d9138cb185493e1 (patch)
tree061a82e13161cfd0ec17d3994e6e318ba70ec264 /Source/cmNinjaNormalTargetGenerator.cxx
parent0bf53483295a4b7de358e8b85ad44866d89633c5 (diff)
downloadCMake-02c14b7fcd29a7dcedb930fe5d9138cb185493e1.zip
CMake-02c14b7fcd29a7dcedb930fe5d9138cb185493e1.tar.gz
CMake-02c14b7fcd29a7dcedb930fe5d9138cb185493e1.tar.bz2
Ninja,Swift: pass along DEFINES/FLAGS/INCLUDES
Since the Swift model does a single compile/link phase, we would not get the compile definitions, includes, and options past along to the build of the module. Compute these for the target when constructing the main command.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 06063b2..59d0707 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -288,6 +288,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
vars.SwiftModuleName = "$SWIFT_MODULE_NAME";
vars.SwiftOutputFileMap = "$SWIFT_OUTPUT_FILE_MAP";
vars.SwiftSources = "$SWIFT_SOURCES";
+
+ vars.Defines = "$DEFINES";
+ vars.Flags = "$FLAGS";
+ vars.Includes = "$INCLUDES";
}
std::string responseFlag;
@@ -865,6 +869,13 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
}
return oss.str();
}();
+
+ // Since we do not perform object builds, compute the
+ // defines/flags/includes here so that they can be passed along
+ // appropriately.
+ vars["DEFINES"] = this->GetDefines("Swift");
+ vars["FLAGS"] = this->GetFlags("Swift");
+ vars["INCLUDES"] = this->GetIncludes("Swift");
}
// Compute specific libraries to link with.