CMake Parallel Build with All Cores
Recently, while trying to compile Traffic Server, came across very poor performance issues, turns out the build was only taking one core, and so in order to use all the cores on the system, we can use -j
or --parallel
to specify the number of jobs to run in parallel.
Example
Note: This will use up all the cores/threads on the system, which may mean the system becomes very slow, and laggy. So, one may choose to free up a CPU by using following command.
Source(s):
Reference: CMake - Documentation
Last updated