Created
August 21, 2020 19:13
-
-
Save chipp/c54ca014ba681f3a2ae20d22cfd0b508 to your computer and use it in GitHub Desktop.
This file contains 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
begin | |
require 'xcodeproj' | |
rescue LoadError | |
$stderr.puts 'Cannot find xcodeproj. Please install it `gem install xcodeproj`' | |
exit 3 | |
end | |
project_path = ARGV[1] | |
project = Xcodeproj::Project.open project_path | |
quick_objc_runtime = project.targets.find { |t| t.name == 'QuickObjCRuntime' } | |
if quick_objc_runtime.nil? | |
puts "Can't find target QuickObjCRuntime" | |
exit 0 | |
end | |
quick_objc_runtime.build_configurations.each do |config| | |
config.build_settings['CLANG_ENABLE_MODULES'] = 'YES' | |
end | |
project.save project_path | |
puts 'Set CLANG_ENABLE_MODULES=YES for QuickObjCRuntime' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment