Skip to content
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

Incorrect OTHER_CFLAGS #4108

Closed
eahrold opened this issue Aug 30, 2015 · 3 comments
Closed

Incorrect OTHER_CFLAGS #4108

eahrold opened this issue Aug 30, 2015 · 3 comments

Comments

@eahrold
Copy link

eahrold commented Aug 30, 2015

I have multiple targets in a project defined in the pod file as such...

source 'https://github.com/CocoaPods/Specs.git'
platform :osx, "10.8"

Proj = ["Project", "ProjectTests"]

Proj.each { |tar|
    target tar do
        pod 'AFNetworking', '~> 2.5.4'
        pod 'Sparkle', '1.8'
        pod 'XMLDictionary', '~> 1.4'
        pod 'mailcore2-osx', '~> 0.5'
        pod 'AHProxySettings', '~> 0.1.1'
        pod 'AHKeychain', '~> 0.2.1'
        pod 'AHLaunchCtl'
    end
}

target "com.project.helper", :exclusive => true do
    pod 'AHLaunchCtl',
    pod 'AHKeychain', '~> 0.2.1'
    pod 'RNCryptor', '~> 2.2'
end

However the resulting Pods-com.project.helper.release.xcconfig looks like this.

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/AHKeychain" "${PODS_ROOT}/Headers/Public/AHLaunchCtl" "${PODS_ROOT}/Headers/Public/AHProxySettings" "${PODS_ROOT}/Headers/Public/RNCryptor" "${PODS_ROOT}/Headers/Public/Sparkle" "${PODS_ROOT}/Headers/Public/XMLDictionary" "${PODS_ROOT}/Headers/Public/mailcore2-osx" "${PODS_ROOT}/Headers/Public/mailcore2-osx/MailCore"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/AHKeychain" -isystem "${PODS_ROOT}/Headers/Public/AHLaunchCtl" -isystem "${PODS_ROOT}/Headers/Public/AHProxySettings" -isystem "${PODS_ROOT}/Headers/Public/RNCryptor" -isystem "${PODS_ROOT}/Headers/Public/Sparkle" -isystem "${PODS_ROOT}/Headers/Public/XMLDictionary" -isystem "${PODS_ROOT}/Headers/Public/mailcore2-osx" -isystem "${PODS_ROOT}/Headers/Public/mailcore2-osx/MailCore"
OTHER_LDFLAGS = -ObjC -l"Pods-com.project.helper-AHKeychain" -l"Pods-com.project.helper-AHLaunchCtl" -l"Pods-com.project.helper-RNCryptor" -framework "Foundation" -framework "Security" -framework "ServiceManagement" -framework "SystemConfiguration"
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
PODS_ROOT = ${SRCROOT}/Pods

So the helper xcconfig file looks as though it's adding all of the OTHER_CFLAGS from the main project as well (for example mailCore2 should not be included).

Consequently in order to get things to compile I must explicitly add the libPods-com.project.helper-xyz lib to the "Link With Libraries" build phase. The libPods-com.project.helper lib alone does not work.

Any advice?
Thanks.

@segiddins
Copy link
Member

I believe this is the intended behavior when using exclusive, but I'm not sure?

@eahrold
Copy link
Author

eahrold commented Aug 31, 2015

I recently added that to the Podfile to see if that changed the behavior. Same results either way.

@neonichu
Copy link
Member

I'm curious to why additional include paths in OTHER_CFLAGS would require changes in linked libraries at all. Unless you import headers from one of the not-linked Pods, this shouldn't happen.

@eahrold eahrold closed this as completed Sep 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants