Page 1 of 1

Parrallel compiling with CMake

Posted: Fri Sep 20, 2019 10:43 am
by o.copleston
With the old GNU Make build system, compiling my projects with

Code: Select all

make -j8
would drastically reduce my build time from minutes to seconds. How can I do this with the idf.py CMake build system?

Re: Parrallel compiling with CMake

Posted: Thu Oct 10, 2019 6:44 am
by MindReader32
Hi,

I'd also like to know too please.

Thanks

Re: Parrallel compiling with CMake

Posted: Thu Oct 10, 2019 8:08 am
by ESP_renz
CMake automatically does parallel builds.

Even faster build times can be achieved by using ccache. This can be done by:

1. passing argument `--ccache` to idf.py everytime you build
2. set CCACHE_ENABLE=1 before project() call in project CMakeLists.txt like so

Code: Select all

...
set(CCACHE_ENABLE 1)
project(...)
You need to have ccache installed on your system, however.

Re: Parrallel compiling with CMake

Posted: Sun Oct 13, 2019 10:04 am
by MindReader32
cool, thanks, ccache is working a treat on macOS using homebrew.