-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build with a spec's compile_flags
directive.
#73
Conversation
@@ -89,6 +90,7 @@ def build_with_mangling(platform) | |||
|
|||
def compile(platform) | |||
defines = "GCC_PREPROCESSOR_DEFINITIONS='PodsDummy_Pods_#{@spec.name}=PodsDummy_PodPackage_#{@spec.name}'" | |||
defines += " #{@spec.consumer(platform).compiler_flags.join(' ')}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could just be defines << @spec.consumer(platform).compiler_flags.join(' ')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, could definitely change +=
to <<
if you'd like, but it needs the leading space on that string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then just << ' ' <<
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
Build with a spec's `compile_flags` directive.
Thanks! |
This change makes cocoapods-packager use a podspec's
compiler_flag
/compiler_flags
when building the pod for packaging. Two further related changes are made:specs/specification/builder_spec.rb
tospecs/specification/spec_builder_spec.rb
which is a better name (it tests theSpecBuilder
class, notBuilder
).Note that it does not add these compiler flags to the generated podspec, so a project using the generated pod will not have these flags set. I think this is the expected behaviour.