Created
January 3, 2020 12:51
-
-
Save WiesnerPeti/71f4646cbcddcd1ad0913a5c79ba1fdd to your computer and use it in GitHub Desktop.
Stringify XCCONFIG other linker flags hashmap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Helper to stringify OTHER_LDFLAGS content | |
def stringFromhash(hash) | |
items = hash.reduce([]) do |sum,(key,val)| | |
if key == :simple | |
sum += val.to_a.map{ |i| "#{i}"} | |
elsif key == :frameworks | |
sum += val.to_a.map{ |i| "-framework \"#{i}\""} | |
elsif key == :weak_frameworks | |
sum += val.to_a.map{ |i| "-weak_framework \"#{i}\""} | |
elsif key == :libraries | |
sum += val.to_a.map{ |i| "-l\"#{i}\""} | |
elsif key == :force_load | |
sum += val.to_a.map{ |i| "-force_load \"#{i}\""} | |
end | |
end | |
return items.join(' ') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment