How to change the number of parallel compilations when building a C++ project with XCode ?
I am not talking about distributed builds, but on simultaneous compilations of a set of source files from a single project, on a single computer. (currently using Xcode 3.2.4)
Thanks
By reducing the size of your targets, you will obtain a better parallelization. When opening your project in Xcode 10, build parallelization should already be enabled. To check or change this option, open your scheme editor, select “Build” in the sidebar and make sure “Parallelize Build” is checked at the top.
Use parallelized builds: Parallelized builds can reduce total Xcode build times by building components of the app that do not depend on each other at the same time. For projects with many smaller dependencies that can easily be run in parallel, this can offer significant time savings.
'Incremental' says to compile only the files that are modified and 'Whole module' denotes to build all files in the project irrespective of the changes made. Action Points. 1. Goto 'Compilation Mode' in build settings. By default, Xcode 10 should have set it to 'Incremental' for Debug and 'Whole Module' for Release.
For Xcode 4 you must set the IDEBuildOperationMaxNumberOfConcurrentCompileTasks user default, for example:
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4
Note the "dt". This won't affect xcodebuild on the command line. To do that, use something like
xcodebuild -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=4 ...
(See http://lists.apple.com/archives/xcode-users/2011/Apr/msg00403.html and http://lists.apple.com/archives/xcode-users/2011/Jul//msg00377.html )
Adjust the PBXNumberOfParallelBuildSubtasks
user default, for example:
defaults write com.apple.XCode PBXNumberOfParallelBuildSubtasks 6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With