JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

[Bug]: -- Building juceaide is built only using one CPU Core

Open Justinzobel opened this issue 3 years ago • 2 comments

Detailed steps on how to reproduce the bug

Run cmake

What is the expected behaviour?

Use all cores

Operating systems

Linux

What versions of the operating systems?

Raspbian 10

Architectures

ARM

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

I have not tested against the develop branch

Code of Conduct

  • [X] I agree to follow the Code of Conduct

Justinzobel avatar May 28 '22 01:05 Justinzobel

Yeah, looks like --build is called with no explicit parallelization:

https://github.com/juce-framework/JUCE/blob/2f980209cc4091a4490bb1bafc5d530f16834e58/extras/Build/juceaide/CMakeLists.txt#L93-L98

Try

export CMAKE_BUILD_PARALLEL_LEVEL=4

https://cmake.org/cmake/help/latest/envvar/CMAKE_BUILD_PARALLEL_LEVEL.html#envvar:CMAKE_BUILD_PARALLEL_LEVEL

I can confirm this breaks the task up across cores.

sudara avatar May 28 '22 13:05 sudara

Yeah that fixes it I believe, I'm guessing you could use nproc to determine the user's core count.

Justinzobel avatar May 29 '22 02:05 Justinzobel