Commit d4035089 authored by Eloy Durán's avatar Eloy Durán

Merge pull request #3183 from CocoaPods/samdmarshall-xclegacy-build-setting-build-dir-fix

[Project] Legacy Build Location Support
parents 07257721 dcfc2e3c
......@@ -65,6 +65,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Boris Bügling](https://github.com/neonichu)
[#2912](https://github.com/CocoaPods/CocoaPods/issues/2912)
* Adding Xcode Legacy build location support for default Pods.xcodeproj.
It defaults to `${SRCROOT}/../build` but can be changed in a `post_install`
hook by using the `Project#symroot=` writer.
[Sam Marshall](https://github.com/samdmarshall)
##### Bug Fixes
* Added support for .tpp C++ header files in specs (previously were getting
......
......@@ -17,6 +17,7 @@ module Pod
@refs_by_absolute_path = {}
@pods = new_group('Pods')
@development_pods = new_group('Development Pods')
self.symroot = LEGACY_BUILD_ROOT
end
# @return [PBXGroup] The group for the support files of the aggregate
......@@ -34,6 +35,25 @@ module Pod
public
# @!group Legacy Xcode build root
#-------------------------------------------------------------------------#
LEGACY_BUILD_ROOT = '${SRCROOT}/../build'
# @param [String] symroot
# The build root that is used when Xcode is configured to not use the
# workspace’s build root. Defaults to `${SRCROOT}/../build`.
#
# @return [void]
#
def symroot=(symroot)
root_object.build_configuration_list.build_configurations.each do |config|
config.build_settings['SYMROOT'] = symroot
end
end
public
# @!group Pod Groups
#-------------------------------------------------------------------------#
......
......@@ -20,6 +20,21 @@ module Pod
it 'creates the development Pods group on initialization' do
@project.development_pods.name.should == 'Development Pods'
end
def settings_for_root_configs(key)
@project.root_object.build_configuration_list.build_configurations.map do |config|
config.build_settings[key]
end
end
it 'assigns a SYMROOT to each root build configuration' do
@project.symroot = 'some/build/path'
settings_for_root_configs('SYMROOT').uniq.should == ['some/build/path']
end
it 'sets a default SYMROOT for legacy Xcode build setups' do
settings_for_root_configs('SYMROOT').uniq.should == [Project::LEGACY_BUILD_ROOT]
end
end
#-------------------------------------------------------------------------#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment