diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2019-01-31 15:39:44 -0800 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2019-02-13 09:25:29 -0800 |
commit | 157570b5a2d3135e2d83f9bd2865ad666a709499 (patch) | |
tree | 879769f432d9dd8f0a9786db6612ac334b1018b3 /Source/cmRulePlaceholderExpander.cxx | |
parent | 63efce507bfcf7eec1dbcb10acadeb3304d6f20d (diff) | |
download | cmake-157570b5a2d3135e2d83f9bd2865ad666a709499.tar.gz |
Add placeholder for Swift's library name
This allows us to set the proper link name for the Swift library
(soname). Because this needs to be passed to the object being compiled,
we need to create a new placeholder so that it can be sent along to the
frontend. Default to the target name unless it is explicitly provided.
Diffstat (limited to 'Source/cmRulePlaceholderExpander.cxx')
-rw-r--r-- | Source/cmRulePlaceholderExpander.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx index e347a2cf5e..5ebdd1b719 100644 --- a/Source/cmRulePlaceholderExpander.cxx +++ b/Source/cmRulePlaceholderExpander.cxx @@ -172,6 +172,11 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable( return replaceValues.SwiftModuleName; } } + if (replaceValues.SwiftLibraryName) { + if (variable == "SWIFT_LIBRARY_NAME") { + return replaceValues.SwiftLibraryName; + } + } if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" || variable == "TARGET_INSTALLNAME_DIR") { // All these variables depend on TargetSOName |